diff --git a/integration/combination/test_api_settings.py b/integration/combination/test_api_settings.py index 7a9fd95745..5752ba9ae3 100644 --- a/integration/combination/test_api_settings.py +++ b/integration/combination/test_api_settings.py @@ -1,4 +1,4 @@ -from io import BytesIO +import hashlib try: from pathlib import Path @@ -10,8 +10,6 @@ from integration.helpers.base_test import BaseTest -from PIL import Image - class TestApiSettings(BaseTest): def test_method_settings(self): @@ -163,11 +161,15 @@ def verify_binary_media_request(self, url, expected_status_code): response = requests.get(url, headers=headers) status = response.status_code - expected = Image.open(Path(self.code_dir, "AWS_logo_RGB.png")) + expected_file_path = str(Path(self.code_dir, "AWS_logo_RGB.png")) + + with open(expected_file_path, mode="rb") as file: + expected_file_content = file.read() + expected_hash = hashlib.sha1(expected_file_content).hexdigest() if 200 <= status <= 299: - actual = Image.open(BytesIO(response.content)) - self.assertEqual(expected, actual) + actual_hash = hashlib.sha1(response.content).hexdigest() + self.assertEqual(expected_hash, actual_hash) self.assertEqual(status, expected_status_code, " must return HTTP " + str(expected_status_code)) diff --git a/requirements/dev.txt b/requirements/dev.txt index e9f3e9b82a..1424f80d6e 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -15,7 +15,6 @@ parameterized~=0.7.4 pathlib2>=2.3.5; python_version < '3' click~=7.1 dateparser~=0.7 -pillow~=6.2.2 boto3~=1.17 # Requirements for examples