예제 #1
0
 def test_hashed_shard_key(self):
     actual = sharding.hashed_shard_key('1234', 2, 'Root')
     expected = "Key('Root', '%s')" % hashlib.md5('1234').hexdigest()[:2]
     self.assertEqual(expected, str(actual))
예제 #2
0
 def test_hashed_shard_key(self):
   actual = sharding.hashed_shard_key('1234', 2, 'Root')
   expected = "Key('Root', '%s')" % hashlib.md5('1234').hexdigest()[:2]
   self.assertEqual(expected, str(actual))