hydrus/include/TestClientImageHandling.py

16 lines
432 B
Python
Raw Normal View History

2015-11-18 22:44:07 +00:00
import ClientImageHandling
2014-05-07 22:42:30 +00:00
import collections
import HydrusConstants as HC
import os
import TestConstants
import unittest
class TestImageHandling( unittest.TestCase ):
def test_phash( self ):
2017-08-23 21:34:25 +00:00
phashes = ClientImageHandling.GenerateShapePerceptualHashes( os.path.join( HC.STATIC_DIR, 'hydrus.png' ), HC.IMAGE_PNG )
2014-05-07 22:42:30 +00:00
2017-01-18 22:52:39 +00:00
self.assertEqual( phashes, set( [ '\xb4M\xc7\xb2M\xcb8\x1c' ] ) )
2014-05-07 22:42:30 +00:00