Skip to content

Commit

Permalink
💚 [#4606] Update broken tests
Browse files Browse the repository at this point in the history
Tests broke due to changes in behaviour, but the assertions were not
updated accordingly yet.
  • Loading branch information
sergei-maertens committed Nov 12, 2024
1 parent 4d9db49 commit a8ac8bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,15 +331,15 @@ def test_retrieve_with_explicit_objects_api_group(self):
self.assertGreaterEqual(num_document_types, 6)
# assert that multiple versions are de-duplicated
num_unique = len(
{(item["omschrijving"], item["catalogusLabel"]) for item in data}
{(item["description"], item["catalogueLabel"]) for item in data}
)
self.assertEqual(num_unique, num_document_types)

# check the data types of returned information
record = data[0]
expected = {
"catalogusLabel": str,
"omschrijving": str,
"catalogueLabel": str,
"description": str,
"url": str,
}
for key, type in expected.items():
Expand All @@ -364,13 +364,13 @@ def test_retrieve_filter_by_catalogus(self):

self.assertGreaterEqual(len(data), 3)
# we expect only one catalogue to be returned
catalogi_labels_seen = {item["catalogusLabel"] for item in data}
catalogi_labels_seen = {item["catalogueLabel"] for item in data}
self.assertEqual(len(catalogi_labels_seen), 1)
# check the data types of returned information
record = data[0]
expected = {
"catalogusLabel": str,
"omschrijving": str,
"catalogueLabel": str,
"description": str,
"url": str,
}
for key, type in expected.items():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ def test_backend_registration_succeeds(self, mock_update_payment):
{
"zgw_api_group": zgw_group,
"case_type_identification": "",
"document_type_description": "",
"zaaktype": "https://catalogi.nl/api/v1/zaaktypen/1",
"informatieobjecttype": "https://catalogi.nl/api/v1/informatieobjecttypen/1",
},
Expand Down

0 comments on commit a8ac8bd

Please sign in to comment.