Exemplo n.º 1
0
 def test_pretty_key(self):
     visitor = ShardingByScoringVisitor(Mock())
     self.assertEqual(visitor.pretty_key('1'), 'Scoring type: 1')
Exemplo n.º 2
0
 def test_key(self):
     visitor = ShardingByScoringVisitor(Mock())
     self.assertEqual(visitor.build_key(Mock(scoring='ACM')), 'ACM')
     self.assertEqual(visitor.build_key(Mock(scoring='not_acm')), 'kirov')