2020-01-30 17:56:07 +03:00
|
|
|
from .helper import PillowTestCase, assert_image_equal, assert_image_similar, hopper
|
2017-11-17 22:47:05 +03:00
|
|
|
|
|
|
|
|
|
|
|
class TestUploader(PillowTestCase):
|
2017-11-25 14:01:33 +03:00
|
|
|
def check_upload_equal(self):
|
2019-06-13 18:54:46 +03:00
|
|
|
result = hopper("P").convert("RGB")
|
|
|
|
target = hopper("RGB")
|
2020-01-30 17:56:07 +03:00
|
|
|
assert_image_equal(result, target)
|
2017-11-17 22:47:05 +03:00
|
|
|
|
2017-11-25 14:01:33 +03:00
|
|
|
def check_upload_similar(self):
|
2019-06-13 18:54:46 +03:00
|
|
|
result = hopper("P").convert("RGB")
|
|
|
|
target = hopper("RGB")
|
2020-01-30 17:56:07 +03:00
|
|
|
assert_image_similar(result, target, 0)
|