mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-05 10:47:34 -05:00
Add Reverse Engineered SQL tests for FTS Parsers. Fixes #4471
This commit is contained in:
committed by
Dave Page
parent
1831c9e70a
commit
809e0682bd
@@ -337,9 +337,15 @@ class ReverseEngineeredSQLTestCases(BaseTestGenerator):
|
||||
self.final_test_status = False
|
||||
print(scenario['name'] + "... FAIL")
|
||||
traceback.print_exc()
|
||||
|
||||
resp = json.loads(response.data)
|
||||
resp_sql = resp['data']
|
||||
try:
|
||||
if type(response.data) == bytes:
|
||||
response_data = response.data.decode('utf8')
|
||||
resp = json.loads(response_data)
|
||||
else:
|
||||
resp = json.loads(response.data)
|
||||
resp_sql = resp['data']
|
||||
except Exception:
|
||||
print("Unable to decode the response data from url: ", url)
|
||||
|
||||
# Remove first and last double quotes
|
||||
if resp_sql.startswith('"') and resp_sql.endswith('"'):
|
||||
|
||||
Reference in New Issue
Block a user