Add Reverse Engineered SQL tests for FTS Parsers. Fixes #4471

This commit is contained in:
Shubham Agarwal
2019-07-15 12:02:44 +01:00
committed by Dave Page
parent 1831c9e70a
commit 809e0682bd
5 changed files with 77 additions and 3 deletions
+9 -3
View File
@@ -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('"'):