Fixed API test cases.

This commit is contained in:
Akshay Joshi
2022-10-20 17:47:27 +05:30
parent db5e181b4f
commit 964c7b1d28
5 changed files with 17 additions and 5 deletions

View File

@@ -79,7 +79,10 @@ class BatchProcessTest(BaseTestGenerator):
self.port = port
def db_session_add_mock(j):
cmd_obj = loads(j.desc)
try:
cmd_obj = loads(bytes.fromhex(j.desc))
except Exception:
cmd_obj = loads(j.desc)
self.assertTrue(isinstance(cmd_obj, IProcessDesc))
self.assertEqual(cmd_obj.query, self.class_params['cmd'])
self.assertEqual(cmd_obj.message, self.expected_msg)