From a5bd0c7380fc65ac2eb534360c7381feae730993 Mon Sep 17 00:00:00 2001 From: tan Date: Mon, 1 Dec 2025 11:35:10 +0530 Subject: [PATCH] test: fix project checks for datasets Dataset versions that are not attached to projects do not have the project attribute returned. Adjusting the check in tests. Ref: https://github.com/JuliaComputing/JuliaHub.jl/pull/115 --- test/projects-live.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/projects-live.jl b/test/projects-live.jl index 56e00d621..22fd98e58 100644 --- a/test/projects-live.jl +++ b/test/projects-live.jl @@ -144,7 +144,7 @@ try @test dataset.project.is_writable === true @test length(dataset.versions) == 2 - @test dataset._json["versions"][1]["project"] === nothing + @test !haskey(dataset._json["versions"][1], "project") @test dataset._json["versions"][1]["uploader"]["username"] == auth.username @test dataset._json["versions"][2]["project"] == project.project_id @test dataset._json["versions"][2]["uploader"]["username"] == auth.username @@ -162,7 +162,7 @@ try @test dataset.project.is_writable === true @test length(dataset.versions) == 2 - @test dataset._json["versions"][1]["project"] === nothing + @test !haskey(dataset._json["versions"][1], "project") @test dataset._json["versions"][1]["uploader"]["username"] == auth.username @test dataset._json["versions"][2]["project"] == project.project_id @test dataset._json["versions"][2]["uploader"]["username"] == auth.username