def test_get_assets(self): req = {'address': user.pub_key.to_string(), 'sym_id': 1} resp = api.get_assets(json.dumps(req)).text res_dict = json.loads(resp) self.assertEqual(len(res_dict), 1, msg=resp) req = {'address': pub2.to_string(), 'sym_id': 3} resp = api.get_assets(json.dumps(req)).text res_dict = json.loads(resp) self.assertTrue(type(res_dict) is list) self.assertEqual(len(res_dict), 1, msg=resp) self.assertEqual(res_dict[0], '0.99000 S#3', msg=resp)
def test_get_assets(self): req = {'address': user.pub_key.to_string()} resp = api.get_assets(json.dumps(req)).text self.assertTrue(str(sym_id) in resp, msg=resp) self.assertTrue(str(2) in resp, msg=resp) self.assertTrue('97' in resp, msg=resp) self.assertTrue('100' in resp, msg=resp) req = {'address': pub2.to_string()} resp = api.get_assets(json.dumps(req)).text self.assertTrue(str(sym_id) in resp, msg=resp) self.assertTrue('3' in resp, msg=resp)