1) Splits the SQL query used to retrieve the Dependents, Dependencies, and Roles SQL file into multiple versioned files.

2) Add Unit Tests for each file.
3) Add ORDER BY into Copy Selection Feature test to ensure the results are retrieved always in the same order
4) Renamed the Scenario of the xss_checks_pgadmin_debugger_test and skip it for versions less than 9.1
5) Deleted unused __init__.py files.
This commit is contained in:
Joao Pedro De Almeida Pereira
2017-05-15 10:40:46 +05:30
committed by Akshay Joshi
parent 0e7efc0cf8
commit 3bf17d9df4
36 changed files with 755 additions and 473 deletions

View File

@@ -353,15 +353,15 @@ class PGChildNodeView(NodeView):
else:
where_clause = where
query = render_template("/".join([sql_path, 'dependents.sql']),
fetch_dependencies=True, where_clause=where_clause)
query = render_template("/".join([sql_path, 'dependencies.sql']),
where_clause=where_clause)
# fetch the dependency for the selected object
dependencies = self.__fetch_dependency(conn, query)
# fetch role dependencies
if where_clause.find('subid') < 0:
sql = render_template("/".join([sql_path, 'dependents.sql']),
fetch_role_dependencies=True, where_clause=where_clause)
sql = render_template("/".join([sql_path, 'role_dependencies.sql']),
where_clause=where_clause)
status, result = conn.execute_dict(sql)
if not status:
@@ -402,7 +402,7 @@ class PGChildNodeView(NodeView):
where_clause = where
query = render_template("/".join([sql_path, 'dependents.sql']),
fetch_dependents=True, where_clause=where_clause)
where_clause=where_clause)
# fetch the dependency for the selected object
dependents = self.__fetch_dependency(conn, query)