From e8057a22a2136dea563c25b34211024e04e34231 Mon Sep 17 00:00:00 2001 From: Sofia Bilous Date: Sun, 8 Oct 2023 15:31:16 +0300 Subject: [PATCH] both files print --- profiles/tests/test_crud_profile.py | 2 +- validation/validate_image.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/profiles/tests/test_crud_profile.py b/profiles/tests/test_crud_profile.py index 11a8fd562..9321f566f 100644 --- a/profiles/tests/test_crud_profile.py +++ b/profiles/tests/test_crud_profile.py @@ -537,7 +537,7 @@ def test_full_update_profile_authorized_with_full_data(self): max_wrong = sys.getsizeof(self.wrong_image) print(max_wrong, '*'*10) # print(response.content, '*'*10) - self.assertEqual(status.HTTP_200_OK, response.status_code) + self.assertEqual(status.HTTP_200_OK, response.status_code, response.content) def test_full_update_profile_unauthorized(self): category = CategoryFactory() diff --git a/validation/validate_image.py b/validation/validate_image.py index 6d0faa3f0..1ec0ee421 100644 --- a/validation/validate_image.py +++ b/validation/validate_image.py @@ -16,5 +16,6 @@ def validate_image_size(image: Image): import sys max_size = sys.getsizeof(image) + print(f"{max_size=}") if max_size > 50: raise ValidationError("Image size exceeds the maximum allowed (50MB).")