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

fix unit tests for wallet

parent af565903
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ class Testcases(unittest.TestCase): ...@@ -41,7 +41,7 @@ class Testcases(unittest.TestCase):
self.stm.set_default_account("test") self.stm.set_default_account("test")
set_shared_steem_instance(self.stm) set_shared_steem_instance(self.stm)
# self.stm.newWallet("TestingOneTwoThree") # self.stm.newWallet("TestingOneTwoThree")
self.wallet = Wallet(rpc=self.stm.rpc) self.wallet = Wallet(steem_instance=self.stm)
self.wallet.wipe(True) self.wallet.wipe(True)
self.wallet.newWallet(pwd="TestingOneTwoThree") self.wallet.newWallet(pwd="TestingOneTwoThree")
self.wallet.unlock(pwd="TestingOneTwoThree") self.wallet.unlock(pwd="TestingOneTwoThree")
...@@ -49,7 +49,6 @@ class Testcases(unittest.TestCase): ...@@ -49,7 +49,6 @@ class Testcases(unittest.TestCase):
def test_wallet_lock(self): def test_wallet_lock(self):
stm = self.stm stm = self.stm
self.wallet.rpc = stm.rpc
self.wallet.steem = stm self.wallet.steem = stm
self.wallet.unlock(pwd="TestingOneTwoThree") self.wallet.unlock(pwd="TestingOneTwoThree")
self.assertTrue(self.wallet.unlocked()) self.assertTrue(self.wallet.unlocked())
...@@ -59,7 +58,6 @@ class Testcases(unittest.TestCase): ...@@ -59,7 +58,6 @@ class Testcases(unittest.TestCase):
def test_change_masterpassword(self): def test_change_masterpassword(self):
stm = self.stm stm = self.stm
self.wallet.rpc = stm.rpc
self.wallet.steem = stm self.wallet.steem = stm
self.wallet.unlock(pwd="TestingOneTwoThree") self.wallet.unlock(pwd="TestingOneTwoThree")
self.assertTrue(self.wallet.unlocked()) self.assertTrue(self.wallet.unlocked())
...@@ -73,7 +71,6 @@ class Testcases(unittest.TestCase): ...@@ -73,7 +71,6 @@ class Testcases(unittest.TestCase):
def test_Keys(self): def test_Keys(self):
stm = self.stm stm = self.stm
self.wallet.rpc = stm.rpc
self.wallet.steem = stm self.wallet.steem = stm
self.wallet.unlock(pwd="TestingOneTwoThree") self.wallet.unlock(pwd="TestingOneTwoThree")
keys = self.wallet.getPublicKeys() keys = self.wallet.getPublicKeys()
...@@ -91,7 +88,6 @@ class Testcases(unittest.TestCase): ...@@ -91,7 +88,6 @@ class Testcases(unittest.TestCase):
stm = self.stm stm = self.stm
else: else:
stm = self.appbase stm = self.appbase
self.wallet.rpc = stm.rpc
self.wallet.steem = stm self.wallet.steem = stm
self.wallet.unlock(pwd="TestingOneTwoThree") self.wallet.unlock(pwd="TestingOneTwoThree")
acc = Account("steemit") acc = Account("steemit")
...@@ -119,7 +115,6 @@ class Testcases(unittest.TestCase): ...@@ -119,7 +115,6 @@ class Testcases(unittest.TestCase):
stm = self.stm stm = self.stm
else: else:
stm = self.appbase stm = self.appbase
self.wallet.rpc = stm.rpc
self.wallet.steem = stm self.wallet.steem = stm
self.wallet.unlock(pwd="TestingOneTwoThree") self.wallet.unlock(pwd="TestingOneTwoThree")
with self.assertRaises( with self.assertRaises(
...@@ -141,7 +136,6 @@ class Testcases(unittest.TestCase): ...@@ -141,7 +136,6 @@ class Testcases(unittest.TestCase):
def test_encrypt(self): def test_encrypt(self):
stm = self.stm stm = self.stm
self.wallet.rpc = stm.rpc
self.wallet.steem = stm self.wallet.steem = stm
self.wallet.unlock(pwd="TestingOneTwoThree") self.wallet.unlock(pwd="TestingOneTwoThree")
self.wallet.masterpassword = "TestingOneTwoThree" self.wallet.masterpassword = "TestingOneTwoThree"
...@@ -156,7 +150,6 @@ class Testcases(unittest.TestCase): ...@@ -156,7 +150,6 @@ class Testcases(unittest.TestCase):
def test_deencrypt(self): def test_deencrypt(self):
stm = self.stm stm = self.stm
self.wallet.rpc = stm.rpc
self.wallet.steem = stm self.wallet.steem = stm
self.wallet.unlock(pwd="TestingOneTwoThree") self.wallet.unlock(pwd="TestingOneTwoThree")
self.wallet.masterpassword = "TestingOneTwoThree" self.wallet.masterpassword = "TestingOneTwoThree"
......
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