Skip to content

Commit 6b466d8

Browse files
committed
Treat publish response as a dict, not an obj
1 parent e272207 commit 6b466d8

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

Test/client_test.py

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -222,28 +222,32 @@ def test_algorithm_programmatic_create_process(self):
222222

223223
# --- testing complete, now publishing new release.
224224

225-
# Just commenting out this part, to temporarily to check the CI
226-
227-
# pub_settings = {"algorithm_callability": "private"}
228-
# pub_version_info = {
229-
# "release_notes": "created programmatically",
230-
# "sample_input": payload,
231-
# "version_type": "minor"
232-
# }
233-
# pub_details = {"label": "testing123"}
225+
pub_settings = {"algorithm_callability": "private"}
226+
pub_version_info = {
227+
"release_notes": "created programmatically",
228+
"sample_input": payload,
229+
"version_type": "minor",
230+
}
231+
pub_details = {"label": "testing123"}
234232

235-
# response = algo_with_build.publish(
236-
# details=pub_details,
237-
# settings=pub_settings,
238-
# version_info=pub_version_info
239-
# )
240-
# self.assertEqual(response.version_info.semantic_version, "0.1.0", "Publishing failed, semantic version is not correct.")
233+
response = algo_with_build.publish(
234+
details=pub_details, settings=pub_settings, version_info=pub_version_info
235+
)
236+
self.assertEqual(
237+
response["version_info"]["semantic_version"],
238+
"0.1.0",
239+
"Publishing failed, semantic version is not correct.",
240+
)
241241

242-
# # --- publishing complete, getting additional information
242+
# --- publishing complete, getting additional information
243243

244-
# response = created_algo.info(git_hash)
244+
response = created_algo.info(git_hash)
245245

246-
# self.assertEqual(response.version_info.semantic_version, "0.1.0", "information is incorrect")
246+
self.assertEqual(
247+
response["version_info"]["semantic_version"],
248+
"0.1.0",
249+
"information is incorrect",
250+
)
247251

248252

249253
if __name__ == "__main__":

0 commit comments

Comments
 (0)