From d160962509e7210320c159a1b4b19c9e63a21a30 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Tue, 30 Jan 2018 10:36:40 +0100 Subject: [PATCH] Fix CI --- flatisfy/tests.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/flatisfy/tests.py b/flatisfy/tests.py index d686a36..9c714e9 100644 --- a/flatisfy/tests.py +++ b/flatisfy/tests.py @@ -11,6 +11,9 @@ import sys import unittest import tempfile +from io import BytesIO + +import PIL import requests import requests_mock @@ -36,7 +39,7 @@ class LocalImageCache(ImageCache): with requests_mock.Mocker() as mock: with open(path, "rb") as fh: mock.get(url, content=fh.read()) - return requests.get(url) + return PIL.Image.open(BytesIO(requests.get(url).content)) class TestTexts(unittest.TestCase): @@ -266,7 +269,7 @@ class TestDuplicates(unittest.TestCase): """ Checks duplicates detection. """ - DUPLICATES_MIN_SCORE_WITHOUT_PHOTOS = 14 # pylint: disable=invalid-name + DUPLICATES_MIN_SCORE_WITHOUT_PHOTOS = 8 # pylint: disable=invalid-name DUPLICATES_MIN_SCORE_WITH_PHOTOS = 15 # pylint: disable=invalid-name HASH_THRESHOLD = 10 # pylint: disable=invalid-name