Exemple #1
0
 def test_tricky_data(self):
     # should not explode if the constituency does not have a full
     # set of data
     data = self.data.copy()
     data.update(self.tricky_data)
     self.assertEqual(geo.neighbors("Altrincham & Sale West", limit=3, _data=data),
                      ["Stretford & Urmston", "Tatton", "Hertsmere"])
Exemple #2
0
 def test_neigbors_north(self):
     # Tatton and Stretford are closer to Altrincham then Hertsmere
     self.assertEqual(geo.neighbors("Altrincham & Sale West", limit=3, _data=self.data),
                      ["Stretford & Urmston", "Tatton", "Hertsmere"])
Exemple #3
0
 def test_neigbors_south(self):
     # Hendon & Hertsmere are closer to Chipping Barnet then Tatton
     self.assertEqual(geo.neighbors("Chipping Barnet", limit=3, _data=self.data),
                      ["Hendon", "Hertsmere", "Tatton"])