Skip to content
Snippets Groups Projects
Commit 65bcdec4 authored by Holger's avatar Holger
Browse files

Fix unit tests

parent 5613a57c
No related branches found
No related tags found
No related merge requests found
...@@ -65,7 +65,7 @@ class Testcases(unittest.TestCase): ...@@ -65,7 +65,7 @@ class Testcases(unittest.TestCase):
STEEM_REVERSE_AUCTION_WINDOW_SECONDS = steem_conf['STEEM_REVERSE_AUCTION_WINDOW_SECONDS'] STEEM_REVERSE_AUCTION_WINDOW_SECONDS = steem_conf['STEEM_REVERSE_AUCTION_WINDOW_SECONDS']
else: else:
STEEM_REVERSE_AUCTION_WINDOW_SECONDS = steem_conf['STEEMIT_REVERSE_AUCTION_WINDOW_SECONDS'] STEEM_REVERSE_AUCTION_WINDOW_SECONDS = steem_conf['STEEMIT_REVERSE_AUCTION_WINDOW_SECONDS']
self.assertEqual(constants.STEEM_REVERSE_AUCTION_WINDOW_SECONDS, STEEM_REVERSE_AUCTION_WINDOW_SECONDS) self.assertEqual(constants.STEEM_REVERSE_AUCTION_WINDOW_SECONDS_HF6, STEEM_REVERSE_AUCTION_WINDOW_SECONDS)
if "STEEM_VOTE_REGENERATION_SECONDS" in steem_conf: if "STEEM_VOTE_REGENERATION_SECONDS" in steem_conf:
STEEM_VOTE_REGENERATION_SECONDS = steem_conf['STEEM_VOTE_REGENERATION_SECONDS'] STEEM_VOTE_REGENERATION_SECONDS = steem_conf['STEEM_VOTE_REGENERATION_SECONDS']
......
...@@ -24,7 +24,7 @@ class Testcases(unittest.TestCase): ...@@ -24,7 +24,7 @@ class Testcases(unittest.TestCase):
def test_get_nodes(self): def test_get_nodes(self):
nodelist = NodeList() nodelist = NodeList()
all_nodes = nodelist.get_nodes(normal=True, appbase=True, dev=True, testnet=True, testnetdev=True) all_nodes = nodelist.get_nodes(normal=True, appbase=True, dev=True, testnet=True, testnetdev=True)
self.assertEqual(len(nodelist) - 6, len(all_nodes)) self.assertEqual(len(nodelist) - 7, len(all_nodes))
https_nodes = nodelist.get_nodes(wss=False) https_nodes = nodelist.get_nodes(wss=False)
self.assertEqual(https_nodes[0][:5], 'https') self.assertEqual(https_nodes[0][:5], 'https')
......
...@@ -119,15 +119,8 @@ class Testcases(unittest.TestCase): ...@@ -119,15 +119,8 @@ class Testcases(unittest.TestCase):
): ):
Vote(construct_authorpermvoter("sdalfj", "dsfa", "asdfsldfjlasd"), steem_instance=bts) Vote(construct_authorpermvoter("sdalfj", "dsfa", "asdfsldfjlasd"), steem_instance=bts)
@parameterized.expand([ def test_activevotes(self):
("normal"), bts = self.bts
("testnet"),
])
def test_activevotes(self, node_param):
if node_param == "normal":
bts = self.bts
else:
bts = self.testnet
votes = ActiveVotes(self.authorperm, steem_instance=bts) votes = ActiveVotes(self.authorperm, steem_instance=bts)
votes.printAsTable() votes.printAsTable()
vote_list = votes.get_list() vote_list = votes.get_list()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment