Fixed geocode street point integration tests

This commit is contained in:
Mario de Frutos 2016-01-25 18:48:27 +01:00
parent e4f327f890
commit 5309a6eae5
2 changed files with 3 additions and 3 deletions

View File

@ -1,3 +1,3 @@
id,country,province,city,postalcode,ip,street id,country,province,city,postalcode,ip,street
1,Spain,Castilla y León,Valladolid,47010,8.8.8.8,Calle Amor de Dios 1,Spain,Castilla y León,Valladolid,47010,8.8.8.8,Calle Amor de Dios
2,USA,New York,Manhattn,10001,8.8.8.8,NonExistentStreet 2,USA,New York,Manhattn,10001,8.8.8.8,135 W 30th St

1 id country province city postalcode ip street
2 1 Spain Castilla y León Valladolid 47010 8.8.8.8 Calle Amor de Dios
3 2 USA New York Manhattn 10001 8.8.8.8 NonExistentStreet 135 W 30th St

View File

@ -15,7 +15,7 @@ class TestStreetFunctions(TestCase):
) )
def test_if_select_with_street_point_is_ok(self): def test_if_select_with_street_point_is_ok(self):
query = "SELECT cdb_geocode_street_point_v2_(street) " \ query = "SELECT cdb_geocode_street_point_v2(street) " \
"as geometry FROM {0} LIMIT 1&api_key={1}".format( "as geometry FROM {0} LIMIT 1&api_key={1}".format(
self.env_variables['table_name'], self.env_variables['table_name'],
self.env_variables['api_key']) self.env_variables['api_key'])
@ -23,7 +23,7 @@ class TestStreetFunctions(TestCase):
assert_not_equal(geometry, None) assert_not_equal(geometry, None)
def test_if_select_with_street_without_api_key_raise_error(self): def test_if_select_with_street_without_api_key_raise_error(self):
query = "SELECT cdb_geocode_street_point_v2_(street) " \ query = "SELECT cdb_geocode_street_point_v2(street) " \
"as geometry FROM {0} LIMIT 1".format( "as geometry FROM {0} LIMIT 1".format(
self.env_variables['table_name']) self.env_variables['table_name'])
try: try: