Skip to content

Commit

Permalink
Add more unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
holgern committed Apr 8, 2020
1 parent 0fda10d commit 5d22500
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/beem/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,14 @@ def test_updatenodes(self):
runner.invoke(cli, ['-o', 'set', 'nodes', self.node_list])
result = runner.invoke(cli, ['updatenodes', '--hive', '--test'])
self.assertEqual(result.exit_code, 0)
result = runner.invoke(cli, ['updatenodes', '--steem'])
self.assertEqual(result.exit_code, 0)
result = runner.invoke(cli, ['updatenodes'])
self.assertEqual(result.exit_code, 0)
result = runner.invoke(cli, ['updatenodes', '--hive'])
self.assertEqual(result.exit_code, 0)
result = runner.invoke(cli, ['updatenodes'])
self.assertEqual(result.exit_code, 0)
runner.invoke(cli, ['-o', 'set', 'nodes', str(self.node_list)])

def test_currentnode(self):
Expand Down
7 changes: 7 additions & 0 deletions tests/beem/test_steem.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,10 @@ def test_broadcast(self):
exceptions.MissingKeyError
):
bts.broadcast(tx=tx)

def test_switch_blockchain(self):
bts = self.bts
bts.switch_blockchain("steem", update_nodes=True)
assert not bts.is_hive
bts.switch_blockchain("hive", update_nodes=True)
assert bts.is_hive

0 comments on commit 5d22500

Please sign in to comment.