Skip to content

Commit

Permalink
test: resolved test
Browse files Browse the repository at this point in the history
  • Loading branch information
lbarbMITRE committed Nov 14, 2023
1 parent 2331bba commit 78bfe86
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions tests/unit/restapi/test_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,16 +274,16 @@ def test_register_experiment(
experiment1_expected = register_experiment(client, name="mnist_name").get_json()
experiment2_expected = register_experiment(client, name="mnist_id").get_json()
assert_retrieving_experiment_by_name_works(
client, queue_name=experiment1_expected["name"], expected=experiment1_expected
client, name=experiment1_expected["name"], expected=experiment1_expected
)
assert_retrieving_experiment_by_id_works(
client, id=experiment1_expected["experimentId"], expected=experiment1_expected
client, id=experiment1_expected["experiment_id"], expected=experiment1_expected
)
assert_retrieving_experiment_by_name_works(
client, queue_name=experiment2_expected["name"], expected=experiment2_expected
client, name=experiment2_expected["name"], expected=experiment2_expected
)
assert_retrieving_experiment_by_id_works(
client, id=experiment2_expected["experimentId"], expected=experiment2_expected
client, id=experiment2_expected["experiment_id"], expected=experiment2_expected
)


Expand Down Expand Up @@ -322,10 +322,10 @@ def test_retrieve_experiment(
"""
experiment_expected = register_experiment(client, name="mnist").get_json()
assert_retrieving_experiment_by_name_works(
client, queue_name=experiment_expected["name"], expected=experiment_expected
client, name=experiment_expected["name"], expected=experiment_expected
)
assert_retrieving_experiment_by_id_works(
client, id=experiment_expected["experimentId"], expected=experiment_expected
client, id=experiment_expected["experiment_id"], expected=experiment_expected
)


Expand Down Expand Up @@ -387,15 +387,15 @@ def test_rename_experiment(
update2_name = "fruits360"
experiment_json = register_experiment(client, name=start_name).get_json()
assert_experiment_name_matches_expected_name(
client, id=experiment_json["experimentId"], expected_name=start_name
client, id=experiment_json["experiment_id"], expected_name=start_name
)
rename_experiment_with_name(client, name="mnist", new_name=update1_name)
assert_experiment_name_matches_expected_name(
client, id=experiment_json["experimentId"], expected_name=update1_name
client, id=experiment_json["experiment_id"], expected_name=update1_name
)
rename_experiment_with_id(client, id=experiment_json["experimentId"], new_name=update2_name)
rename_experiment_with_id(client, id=experiment_json["experiment_id"], new_name=update2_name)
assert_experiment_name_matches_expected_name(
client, id=experiment_json["experimentId"], expected_name=update2_name
client, id=experiment_json["experiment_id"], expected_name=update2_name
)


Expand Down Expand Up @@ -430,19 +430,19 @@ def test_delete_experiment(
name_by_name = "mnist"
experiment1_json = register_experiment(client, name=name_by_name).get_json()
assert_retrieving_experiment_by_id_works(
client, queue_id=experiment1_json["experimentId"], expected=experiment1_json
client, id=experiment1_json["experiment_id"], expected=experiment1_json
)
delete_experiment_with_name(client, name=name_by_name)
assert_experiment_is_not_found(
client, experiment_id=experiment1_json["experimentId"]
client, id=experiment1_json["experiment_id"]
)

name_by_id = "imagenet"
experiment2_json = register_experiment(client, name=name_by_id).get_json()
assert_retrieving_experiment_by_id_works(
client, queue_id=experiment2_json["experimentId"], expected=experiment2_json
client, id=experiment2_json["experiment_id"], expected=experiment2_json
)
delete_experiment_with_id(client, id=experiment2_json["experimentId"])
delete_experiment_with_id(client, id=experiment2_json["experiment_id"])
assert_experiment_is_not_found(
client, experiment_id=experiment2_json["experimentId"]
client, id=experiment2_json["experiment_id"]
)

0 comments on commit 78bfe86

Please sign in to comment.