Skip to content
Snippets Groups Projects
Commit 07e0283f authored by Holger Nahrstaedt's avatar Holger Nahrstaedt
Browse files

Unit test for Issue #4

parent bf60b74c
No related branches found
No related tags found
No related merge requests found
...@@ -105,9 +105,15 @@ class Testcases(unittest.TestCase): ...@@ -105,9 +105,15 @@ class Testcases(unittest.TestCase):
tx = c.upvote(weight=150, voter="test") tx = c.upvote(weight=150, voter="test")
op = tx["operations"][0][1] op = tx["operations"][0][1]
self.assertEqual(op["weight"], 10000) self.assertEqual(op["weight"], 10000)
tx = c.upvote(weight=99.9, voter="test")
op = tx["operations"][0][1]
self.assertEqual(op["weight"], 9990)
tx = c.downvote(weight=-150, voter="test") tx = c.downvote(weight=-150, voter="test")
op = tx["operations"][0][1] op = tx["operations"][0][1]
self.assertEqual(op["weight"], -10000) self.assertEqual(op["weight"], -10000)
tx = c.downvote(weight=-99.9, voter="test")
op = tx["operations"][0][1]
self.assertEqual(op["weight"], -9990)
@parameterized.expand([ @parameterized.expand([
("non_appbase"), ("non_appbase"),
......
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