示例#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)
示例#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)
示例#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)
示例#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)
示例#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)
示例#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)