Skip to content

Commit

Permalink
Apply missed changes from manufacturers e2e tests for consistency #314
Browse files Browse the repository at this point in the history
  • Loading branch information
joelvdavies committed Jul 10, 2024
1 parent c3c20db commit 2d2d472
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/e2e/test_system.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
End-to-End tests for the system router
End-to-End tests for the system router.
"""

# Expect some duplicate code inside tests as the tests for the different entities can be very similar
Expand Down Expand Up @@ -28,7 +28,7 @@


class CreateDSL:
"""Base class for create tests"""
"""Base class for create tests."""

test_client: TestClient

Expand All @@ -48,8 +48,8 @@ def post_system(self, system_post_data: dict) -> Optional[str]:
`SystemPostSchema`.
:return: ID of the created system (or `None` if not successful).
"""
self._post_response = self.test_client.post("/v1/systems", json=system_post_data)

self._post_response = self.test_client.post("/v1/systems", json=system_post_data)
return self._post_response.json()["id"] if self._post_response.status_code == 201 else None

def check_post_system_success(self, expected_system_get_data: dict) -> None:
Expand Down Expand Up @@ -428,8 +428,7 @@ def patch_system(self, system_id: str, system_patch_data: dict) -> None:
Updates a system with the given id.
:param system_id: ID of the system to patch.
:param system_patch_data: Dictionary containing the basic patch data as would be required for a
`SystemPatchSchema`.
:param system_patch_data: Dictionary containing the patch data as would be required for a `SystemPatchSchema`.
"""

self._patch_response = self.test_client.patch(f"/v1/systems/{system_id}", json=system_patch_data)
Expand Down

0 comments on commit 2d2d472

Please sign in to comment.