Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FedericoCeratto committed Oct 17, 2023
1 parent 7d86c0a commit 27918fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/tests/integ/test_oonirun.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def test_create_fetch_archive(cleanup, client, usersession, adminsession):
### "update" the oonirun by creating a new version, changing the inputs
z["nettests"][0]["inputs"].append("https://foo.net/")
exp["nettests"][0]["inputs"].append("https://foo.net/")
r = usersession.post(f"/api/_/ooni_run/create?id={ooni_run_link_id}", json=z)
r = usersession.post(f"/api/_/ooni_run/create?ooni_run_link_id={ooni_run_link_id}", json=z)
assert r.status_code == 200, r.json
assert r.json["v"] == 1, r.json
assert r.json["ooni_run_link_id"] == ooni_run_link_id
Expand Down Expand Up @@ -215,13 +215,13 @@ def test_create_fetch_archive(cleanup, client, usersession, adminsession):
assert d["archived"] is False

say("Fail to update the oonirun using the wrong account")
r = adminsession.post(f"/api/_/ooni_run/create?id={ooni_run_link_id}", json=z)
r = adminsession.post(f"/api/_/ooni_run/create?ooni_run_link_id={ooni_run_link_id}", json=z)
assert r.status_code == 400, r.json
assert r.json == {"error": "OONIRun descriptor not found"}

say("# Update translations without changing descriptor_creation_time")
z["description_intl"]["it"] = "integ-test *nuova* descrizione in italiano"
r = usersession.post(f"/api/_/ooni_run/create?id={ooni_run_link_id}", json=z)
r = usersession.post(f"/api/_/ooni_run/create?ooni_run_link_id={ooni_run_link_id}", json=z)
assert r.status_code == 200, r.json
say("previous id and descriptor_creation_time, not changed")
assert r.json["ooni_run_link_id"] == ooni_run_link_id
Expand Down

0 comments on commit 27918fc

Please sign in to comment.