Skip to content

Commit

Permalink
tests: fix xenial security-status test
Browse files Browse the repository at this point in the history
This was blocking xenial builds, as there is no guaranteed dict order in
python 3.5

Signed-off-by: Renan Rodrigo <[email protected]>
  • Loading branch information
renanrodrigo committed Oct 11, 2024
1 parent cd3f529 commit 0c715b5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion uaclient/tests/test_security_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,13 @@ def test_security_status_dict(
"livepatch": {"fixed_cves": []},
}

assert expected_output == security_status_dict(cfg)
result = security_status_dict(cfg)
assert expected_output["_schema_version"] == result["_schema_version"]
assert expected_output["livepatch"] == result["livepatch"]
assert expected_output["summary"] == result["summary"]
assert expected_output["packages"] == sorted(
result["packages"], key=lambda x: x["version"]
)


@mock.patch(M_PATH + "livepatch.status")
Expand Down

0 comments on commit 0c715b5

Please sign in to comment.