Skip to content

Commit

Permalink
Complete tests for pet
Browse files Browse the repository at this point in the history
  • Loading branch information
riadelimemmedov committed Feb 17, 2024
1 parent 6db8b14 commit 53d92c3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/abstract/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ class AppName(Enum):
("Spayed", _("spayed")),
("Other", _("other")),
]

# !Image Extension
ImageExtension = ["png", "jpg", "jpeg"]
16 changes: 16 additions & 0 deletions backend/infrastructure/test_data_clear.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import logging

logging.basicConfig(
level=logging.DEBUG, format="%(asctime)s - %(levelname)s - %(message)s"
)


# ?TruncateTestData
def TruncateTestData(model):
qs = model.objects.all()
if qs is not None:
for obj in qs:
obj.pet_photo_url.delete()
logging.info("Photo truncated successfully!")
else:
logging.error("Photo not truncated.Please try again!")
Empty file.

0 comments on commit 53d92c3

Please sign in to comment.