def test_crc32(self): table = HashTable() table.hash_fn = table.crc32_hash self.assertEqual(table.crc32_hash("C'est la vie"), 0x2805c0d0 % table.table_size) self.assertEqual(table.crc32_hash("hello-world"), binascii.crc32(b"hello-world") % table.table_size)