예제 #1
0
 def test_md5_force_text(self):
     filepath = os.path.join(project_dir, "tests", "testfile")
     md5 = cct.md5(filepath, force_text=True)
     self.assertNotEqual(md5, '02e6b5a02826a57a066bb658cca94c50')
예제 #2
0
 def test_md5_file(self):
     filepath = os.path.join(project_dir, "tests", "testfile")
     md5 = cct.md5(filepath)
     self.assertEqual(md5, '02e6b5a02826a57a066bb658cca94c50')
예제 #3
0
 def test_md5_int(self):
     md5 = cct.md5(42)
     self.assertEqual(md5, 'a1d0c6e83f027327d8461063f4ac58a6')
예제 #4
0
 def test_md5_bytes(self):
     md5 = cct.md5(b'Test Text')
     self.assertEqual(md5, 'f1feeaa3d698685b6a6179520449e206')
예제 #5
0
 def test_md5_string(self):
     md5 = cct.md5("Test Text")
     self.assertEqual(md5, 'f1feeaa3d698685b6a6179520449e206')