Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
holgern committed Jun 28, 2018
1 parent e316a5e commit 0e36c62
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/beem/test_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,9 @@ def test_json_export(self, node_param):
content = self.bts.rpc.get_accounts([account["name"]])[0]
keys = list(content.keys())
json_content = account.json()

exclude_list = ['json_metadata', 'reputation', 'active_votes', 'savings_sbd_seconds']
for k in keys:
if k not in "json_metadata" and k != 'reputation' and k != 'active_votes' and k != 'savings_sbd_seconds':
if k not in exclude_list:
if isinstance(content[k], dict) and isinstance(json_content[k], list):
content_list = [content[k]["amount"], content[k]["precision"], content[k]["nai"]]
self.assertEqual(content_list, json_content[k])
Expand Down
4 changes: 2 additions & 2 deletions tests/beem/test_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ def test_export(self, node_param):
c = Comment(self.authorperm, steem_instance=bts)
keys = list(content.keys())
json_content = c.json()

exclude_list = ["json_metadata", "reputation", "active_votes"]
for k in keys:
if k not in "json_metadata" and k != 'reputation' and k != 'active_votes':
if k not in exclude_list:
if isinstance(content[k], dict) and isinstance(json_content[k], list):
self.assertEqual(list(content[k].values()), json_content[k])
else:
Expand Down
4 changes: 2 additions & 2 deletions tests/beem/test_witness.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ def test_export(self, node_param):
w = Witness(owner, steem_instance=bts)
keys = list(witness.keys())
json_witness = w.json()

exclude_list = ['votes', 'virtual_last_update', 'virtual_scheduled_time']
for k in keys:
if k not in 'votes':
if k not in exclude_list:
if isinstance(witness[k], dict) and isinstance(json_witness[k], list):
self.assertEqual(list(witness[k].values()), json_witness[k])
else:
Expand Down

0 comments on commit 0e36c62

Please sign in to comment.