Skip to content

Commit

Permalink
Changed truncate data process
Browse files Browse the repository at this point in the history
  • Loading branch information
riadelimemmedov committed Mar 5, 2024
1 parent 8f85640 commit e17e9f4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backend/config/tests/pet/test_endpoint_pet.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_return_all_pets(self, pet_factory_end_to_end, api_client):

assert response.status_code == status.HTTP_200_OK
assert json.loads(response.content)["pet_count"] == 4
TruncateTestData(Pet)
# TruncateTestData(Pet)

def test_create_pet(self, pet_factory_end_to_end, api_client):
"""
Expand Down Expand Up @@ -77,7 +77,7 @@ def test_create_pet(self, pet_factory_end_to_end, api_client):
)
assert response.status_code == status.HTTP_201_CREATED
assert response.data["name"] == "Max"
TruncateTestData(Pet)
# TruncateTestData(Pet)

def test_delete_all_pets(self, pet_factory_end_to_end, api_client):
"""
Expand Down Expand Up @@ -108,7 +108,7 @@ def test_delete_all_pets(self, pet_factory_end_to_end, api_client):
assert response.status_code == status.HTTP_204_NO_CONTENT
assert response.content == b""
assert len(response.content) == 0
TruncateTestData(Pet)
# TruncateTestData(Pet)

def test_get_object_existing_pet(self, pet_factory_end_to_end, api_client):
"""
Expand Down Expand Up @@ -136,7 +136,7 @@ def test_get_object_existing_pet(self, pet_factory_end_to_end, api_client):
assert response.status_code == status.HTTP_200_OK
assert len(obj) == 1
assert response.data["slug"] == obj[0].slug
TruncateTestData(Pet)
# TruncateTestData(Pet)

def test_put_existing_pet(self, pet_factory_end_to_end, api_client):
"""
Expand Down Expand Up @@ -194,7 +194,7 @@ def test_put_existing_pet(self, pet_factory_end_to_end, api_client):
assert response.data["name"] != "Rex"
assert response.data.pop("slug") is not None
assert response.data == PetSerializer(data).data
TruncateTestData(Pet)
# TruncateTestData(Pet)

def test_delete_existing_pet(self, pet_factory_end_to_end, api_client):
"""
Expand Down Expand Up @@ -223,4 +223,4 @@ def test_delete_existing_pet(self, pet_factory_end_to_end, api_client):

response = api_client().get(f"{self.endpoint}{obj[0].slug}/", format="json")
assert response.status_code == status.HTTP_404_NOT_FOUND
TruncateTestData(Pet)
# TruncateTestData(Pet)

0 comments on commit e17e9f4

Please sign in to comment.