Ejemplo n.º 1
0
 def test_retrieve_location_again(self):
     """
     If provided a geonames URI that has already been retrieved, should
     return a Location object with that URI.
     """
     location = retrieve_location(gn_uri)
     self.assertEqual(location.uri, gn_uri)
Ejemplo n.º 2
0
 def test_retrieve_location(self):
     """
     If provided a legit geonames URI, should return a Location object with
     that URI.
     """
     location = retrieve_location(gn_uri)
     self.assertEqual(location.uri, gn_uri)
Ejemplo n.º 3
0
 def test_retrieve_location_again(self):
     """
     If provided a geonames URI that has already been retrieved, should
     return a Location object with that URI.
     """
     location = retrieve_location(gn_uri)
     self.assertEqual(location.uri, gn_uri)
Ejemplo n.º 4
0
 def test_retrieve_location(self):
     """
     If provided a legit geonames URI, should return a Location object with
     that URI.
     """
     location = retrieve_location(gn_uri)
     self.assertEqual(location.uri, gn_uri)
Ejemplo n.º 5
0
 def test_retrieve_nonexistent(self):
     """
     If the URI simply does not exist at that LocationAuthority, should
     return None.
     """
     nonexistent_uri = 'http://www.geonames.org/6943991012349326760/asdf'
     location = retrieve_location(nonexistent_uri)
     self.assertEqual(location, None)
Ejemplo n.º 6
0
 def test_retrieve_nonexistent(self):
     """
     If the URI simply does not exist at that LocationAuthority, should
     return None.
     """
     nonexistent_uri = 'http://www.geonames.org/6943991012349326760/asdf'
     location = retrieve_location(nonexistent_uri)
     self.assertEqual(location, None)