Skip to content

Commit

Permalink
relax order of expected results in testing
Browse files Browse the repository at this point in the history
  • Loading branch information
alex75 committed Jul 24, 2023
1 parent 53b821e commit 39e7000
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions tests/test_40_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1827,17 +1827,21 @@ def test_resource_sync(
os.path.join(TESTDATA_PATH, "dumped_resources3.txt"),
exclude_fields=("record_update", "resource_id", "search_field"),
)
assert session.execute(
sa.text(
"select resource_id, licence_id "
"from resources_licences "
"order by resource_id, licence_id"
)
).all() == [
(1, uid_id_licence_map["licence-to-use-copernicus-products"]),
(2, uid_id_licence_map["eumetsat-cm-saf"]),
(2, uid_id_licence_map["licence-to-use-copernicus-products"]),
]
assert set(
session.execute(
sa.text(
"select resource_id, licence_id "
"from resources_licences "
"order by resource_id, licence_id"
)
).all()
) == set(
[
(1, uid_id_licence_map["licence-to-use-copernicus-products"]),
(2, uid_id_licence_map["eumetsat-cm-saf"]),
(2, uid_id_licence_map["licence-to-use-copernicus-products"]),
]
)
assert session.execute(
sa.text(
"select parent_resource_id, child_resource_id "
Expand Down

0 comments on commit 39e7000

Please sign in to comment.