MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / get_expected_sql

Method get_expected_sql

web/pgadmin/tools/erd/tests/test_sql.py:33–55  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

31 self.maxDiff = None
32
33 def get_expected_sql(self):
34 sql_base_path = path.join(
35 path.dirname(path.realpath(__file__)), 'sql')
36
37 # Iterate the version mapping directories.
38 for version_mapping in \
39 get_version_mapping_directories():
40 if version_mapping['number'] > \
41 self.server_information['server_version']:
42 continue
43
44 complete_path = path.join(
45 sql_base_path, version_mapping['name'])
46
47 if not path.exists(complete_path):
48 continue
49 break
50
51 data_sql = ''
52 with open(path.join(complete_path, 'test_sql_output.sql')) as fp:
53 data_sql = fp.read()
54
55 return data_sql
56
57 def runTest(self):
58 db_con = database_utils.connect_database(self,

Callers 1

runTestMethod · 0.95

Calls 4

joinMethod · 0.80
dirnameMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected