Update the regression tests to fix issues with Python 3.5 and PG 9.2. Fixes #3057

This commit is contained in:
Joao Pedro De Almeida Pereira
2018-01-26 16:45:09 +00:00
committed by Dave Page
parent abcb8c36a3
commit de1c767e88
4 changed files with 235 additions and 176 deletions

View File

@@ -1,4 +1,4 @@
SELECT 'relacl' as deftype, privileges_information.grantee, privileges_information.grantor,
SELECT 'relacl' as deftype, COALESCE(privileges_information.grantee, 'PUBLIC') grantee, privileges_information.grantor,
array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
from (
SELECT
@@ -32,4 +32,4 @@ from (
GROUP BY privileges_information.grantee,privileges_information.grantor
ORDER BY privileges_information.grantee
ORDER BY privileges_information.grantee

View File

@@ -83,6 +83,7 @@ class DataTypeReaderTest(BaseTestGenerator):
@patch('pgadmin.browser.server_groups.servers.databases.schemas.utils.render_template')
def runTest(self, template_mock):
template_mock.return_value = 'Some SQL'
connection = Mock()
connection.execute_2darray.return_value = [
True,
@@ -104,7 +105,7 @@ class DataTypeReaderTest(BaseTestGenerator):
self.assertEqual(result[1], self.expected_function_output)
self.assertTrue(result[0])
connection.execute_2darray.assert_called()
connection.execute_2darray.assert_called_with('Some SQL')
template_mock.assert_called_with(
self.expected_sql_template_path + '/get_types.sql',
condition=self.sql_condition,