def test_pretty_key(self): visitor = ShardingByUserVisitor(Mock()) self.assertEqual(visitor.pretty_key('1'), 'User #1')
def test_key(self): visitor = ShardingByUserVisitor(Mock()) self.assertEqual(visitor.build_key(Mock(user_id='1')), '1')