Skip to content

Commit 61783cd

Browse files
authored
test: fix project checks for datasets (#119)
Dataset versions that are not attached to projects do not have the project attribute returned. Adjusting the check in tests. Ref: #115
1 parent cada613 commit 61783cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/projects-live.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ try
144144
@test dataset.project.is_writable === true
145145

146146
@test length(dataset.versions) == 2
147-
@test dataset._json["versions"][1]["project"] === nothing
147+
@test !haskey(dataset._json["versions"][1], "project")
148148
@test dataset._json["versions"][1]["uploader"]["username"] == auth.username
149149
@test dataset._json["versions"][2]["project"] == project.project_id
150150
@test dataset._json["versions"][2]["uploader"]["username"] == auth.username
@@ -162,7 +162,7 @@ try
162162
@test dataset.project.is_writable === true
163163

164164
@test length(dataset.versions) == 2
165-
@test dataset._json["versions"][1]["project"] === nothing
165+
@test !haskey(dataset._json["versions"][1], "project")
166166
@test dataset._json["versions"][1]["uploader"]["username"] == auth.username
167167
@test dataset._json["versions"][2]["project"] == project.project_id
168168
@test dataset._json["versions"][2]["uploader"]["username"] == auth.username

0 commit comments

Comments
 (0)