From 8ebd22bc26702aa5c21430f5c0e64f5e5a07810f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Ignacio=20S=C3=A1nchez=20Lara?= Date: Mon, 9 Jul 2018 14:09:42 +0200 Subject: [PATCH] Fixes error message check --- test/integration/test_street_functions.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/integration/test_street_functions.py b/test/integration/test_street_functions.py index d1fdbd2..12f5112 100644 --- a/test/integration/test_street_functions.py +++ b/test/integration/test_street_functions.py @@ -30,13 +30,14 @@ class TestStreetFunctions(TestStreetFunctionsSetUp): assert_not_equal(geometry['geometry'], None) def test_if_select_with_street_without_api_key_raise_error(self): + table = self.env_variables['table_name'] query = "SELECT cdb_geocode_street_point(street) " \ - "as geometry FROM {0} LIMIT 1".format( - self.env_variables['table_name']) + "as geometry FROM {0} LIMIT 1".format(table) try: IntegrationTestHelper.execute_query(self.sql_api_url, query) except Exception as e: - assert_equal(e.message[0], "The api_key must be provided") + assert_equal(e.message[0], + "permission denied for relation {}".format(table)) class TestBulkStreetFunctions(TestStreetFunctionsSetUp):