From 5d2250060d2ac563887b2c92f5ecf040db06c01d Mon Sep 17 00:00:00 2001 From: holgern Date: Wed, 8 Apr 2020 14:43:23 +0200 Subject: [PATCH] Add more unit tests --- tests/beem/test_cli.py | 8 ++++++++ tests/beem/test_steem.py | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/tests/beem/test_cli.py b/tests/beem/test_cli.py index 33af36fd..ed01740f 100644 --- a/tests/beem/test_cli.py +++ b/tests/beem/test_cli.py @@ -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): diff --git a/tests/beem/test_steem.py b/tests/beem/test_steem.py index 72d2cd7b..ca4da338 100644 --- a/tests/beem/test_steem.py +++ b/tests/beem/test_steem.py @@ -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