Skip to content

Commit

Permalink
cleaning comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DraKen0009 committed Dec 12, 2024
1 parent a3acba3 commit e5f5edb
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions care/facility/tests/test_assetbed_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,8 @@ def setUpTestData(cls):
def get_base_url(self, asset_bed_id=None):
return f"/api/v1/assetbed/{asset_bed_id or self.asset_bed1.external_id}/camera_presets/"


def test_list_bed_with_deleted_assetbed(self):
# self.asset_bed1.update(deleted=)
res=self.client.post(
res = self.client.post(
self.get_base_url(self.asset_bed1.external_id),
{
"name": "Preset with proper position",
Expand All @@ -441,7 +439,7 @@ def test_list_bed_with_deleted_assetbed(self):
format="json",
)
self.assertEqual(res.status_code, status.HTTP_201_CREATED)
res=self.client.post(
res = self.client.post(
self.get_base_url(self.asset_bed2.external_id),
{
"name": "Preset with proper position 2",
Expand All @@ -455,18 +453,13 @@ def test_list_bed_with_deleted_assetbed(self):
)
self.assertEqual(res.status_code, status.HTTP_201_CREATED)

res = self.client.get(
f"/api/v1/bed/{self.bed.external_id}/camera_presets/"
)
self.assertEqual(len(res.json()["results"]),2)
res = self.client.get(f"/api/v1/bed/{self.bed.external_id}/camera_presets/")
self.assertEqual(len(res.json()["results"]), 2)

self.asset_bed1.delete()
self.asset_bed1.refresh_from_db()
res = self.client.get(
f"/api/v1/bed/{self.bed.external_id}/camera_presets/"
)
self.assertEqual(len(res.json()["results"]),1)

res = self.client.get(f"/api/v1/bed/{self.bed.external_id}/camera_presets/")
self.assertEqual(len(res.json()["results"]), 1)

def test_create_camera_preset_without_position(self):
res = self.client.post(
Expand Down

0 comments on commit e5f5edb

Please sign in to comment.