mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Change the following to replace Python 2 code with Python 3:
1) Replace the deprecated unit test method. 2) Wraps filter usage in a list call. 3) Converts the old metaclass syntax to new. 4) Use range instead of xrange method. 5) Change Unicode to str. 6) Several other transformations. 7) Fixed change password test cases. 8) Use simplejson instead of plain JSON.
This commit is contained in:
committed by
Akshay Joshi
parent
11d5613866
commit
5a253f9053
@@ -109,14 +109,14 @@ class SchemaDiffTestCase():
|
||||
|
||||
response = self.tester.get(comp_url)
|
||||
|
||||
self.assertEquals(response.status_code, 200)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
return json.loads(response.data.decode('utf-8'))
|
||||
|
||||
def runTest(self):
|
||||
""" This function will test the schema diff."""
|
||||
|
||||
response = self.tester.get("schema_diff/initialize")
|
||||
self.assertEquals(response.status_code, 200)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
response_data = json.loads(response.data.decode('utf-8'))
|
||||
self.trans_id = response_data['data']['schemaDiffTransId']
|
||||
|
||||
@@ -162,7 +162,7 @@ class SchemaDiffTestCase():
|
||||
|
||||
response = self.tester.get(url)
|
||||
|
||||
self.assertEquals(response.status_code, 200)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
response_data = json.loads(response.data.decode('utf-8'))
|
||||
file_obj.write(response_data['diff_ddl'])
|
||||
elif 'diff_ddl' in diff:
|
||||
@@ -178,7 +178,7 @@ class SchemaDiffTestCase():
|
||||
response_data = self.compare()
|
||||
for diff in response_data['data']:
|
||||
if diff['type'] in self.nodes:
|
||||
self.assertEquals(diff['status'], 'Identical')
|
||||
self.assertEqual(diff['status'], 'Identical')
|
||||
except Exception as e:
|
||||
os.remove(diff_file)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user