Example #1
0
 def test_unknown_keys_batch(self):
     grouper = FileKeyGrouper(self.options_unknown_key['grouper'])
     batch = get_batch()
     grouped = grouper.group_batch(batch)
     for item in grouped:
         country, state, city = item.group_membership
         self.assertTrue(state == 'unknown')
Example #2
0
 def test_group_batch(self):
     grouper = FileKeyGrouper(self.options_ok['grouper'])
     batch = get_batch()
     grouped = grouper.group_batch(batch)
     for item in grouped:
         country, state, city = item.group_membership
         self.assertTrue(country in country_codes)
         self.assertTrue(state in states)
         self.assertTrue(city in cities)