Skip to content

Commit 465237f

Browse files
lumpy72006audiodude
authored andcommitted
update tests
1 parent 3b046a4 commit 465237f

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

wp1/web/builders_test.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,13 @@ def test_create_successful(self):
235235
"project": "my_project",
236236
},
237237
)
238-
self.assertEqual(self.successful_response, rv.get_json())
238+
response_json = rv.get_json()
239+
240+
self.assertIn("id", response_json)
241+
# Remove the ID to compare against the standard successful response
242+
del response_json["id"]
243+
244+
self.assertEqual(self.successful_response, response_json)
239245

240246
def test_create_throws(self):
241247
self.app = create_app()
@@ -285,7 +291,14 @@ def test_update_successful(self):
285291
"project": "my_project",
286292
},
287293
)
288-
self.assertEqual(self.successful_response, rv.get_json())
294+
295+
response_json = rv.get_json()
296+
297+
self.assertIn("id", response_json)
298+
# Remove the ID to compare against the standard successful response
299+
del response_json["id"]
300+
301+
self.assertEqual(self.successful_response, response_json)
289302

290303
def test_update_not_owner(self):
291304
builder_id = self._insert_builder()

0 commit comments

Comments
 (0)