Skip to content

Commit

Permalink
kyiv
Browse files Browse the repository at this point in the history
  • Loading branch information
BelousSofiya committed Dec 9, 2023
1 parent 509acad commit bda06f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions images/tests/test_banner.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def setUp(self) -> None:
banner_image=f"banners/{self.right_image.name}",
)

self.company_kiev = ProfileCompanyFactory(name="Kyivbud")
self.company_kyiv = ProfileCompanyFactory(name="Kyivbud")

def tearDown(self) -> None:
if os.path.exists(self.right_image.name):
Expand All @@ -46,7 +46,7 @@ def tearDown(self) -> None:
os.remove(self.wrong_image.name)

def test_get_empty_banner_unauthorized(self):
response = self.client.get(path=f"/api/banner/{self.company_kiev.id}/")
response = self.client.get(path=f"/api/banner/{self.company_kyiv.id}/")
self.assertEqual(200, response.status_code)
self.assertEqual({"banner_image": None}, response.json())

Expand Down Expand Up @@ -77,7 +77,7 @@ def test_get_banner_authorized(self):

def test_get_empty_banner_authorized(self):
self.client.force_authenticate(self.user)
response = self.client.get(path=f"/api/banner/{self.company_kiev.id}/")
response = self.client.get(path=f"/api/banner/{self.company_kyiv.id}/")
self.assertEqual(200, response.status_code)
self.assertEqual({"banner_image": None}, response.json())

Expand All @@ -95,7 +95,7 @@ def test_put_banner_unauthorized(self):
def test_put_banner_authorized_not_owner(self):
self.client.force_authenticate(self.user)
response = self.client.put(
path=f"/api/banner/{self.company_kiev.id}/",
path=f"/api/banner/{self.company_kyiv.id}/",
data={"banner_image": self.right_image},
)
self.assertEqual(403, response.status_code)
Expand Down

0 comments on commit bda06f0

Please sign in to comment.