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

try to fix unit tests

parent 9775e203
Branches
Tags
No related merge requests found
...@@ -11,7 +11,7 @@ node. ...@@ -11,7 +11,7 @@ node.
from steempyapi.websocket import SteemWebsocket from steempyapi.websocket import SteemWebsocket
ws = SteemWebsocket( ws = SteemWebsocket(
"wss://testnet.steem.vc, "wss://testnet.steem.vc",
accounts=["test"], accounts=["test"],
# on_market=pprint, # on_market=pprint,
on_account=print, on_account=print,
......
...@@ -230,7 +230,6 @@ class Steem(object): ...@@ -230,7 +230,6 @@ class Steem(object):
# Append tot he default buffer # Append tot he default buffer
self.txbuffer.appendOps(ops) self.txbuffer.appendOps(ops)
assert permission in account, "Could not access %s of account %s"%(permission+account["name"])
# Add signing information, signer, sign and optionally broadcast # Add signing information, signer, sign and optionally broadcast
if self.unsigned: if self.unsigned:
# In case we don't want to sign anything # In case we don't want to sign anything
......
...@@ -100,7 +100,7 @@ class TransactionBuilder(dict): ...@@ -100,7 +100,7 @@ class TransactionBuilder(dict):
""" """
assert permission in ["active", "owner", "posting"], "Invalid permission" assert permission in ["active", "owner", "posting"], "Invalid permission"
account = Account(account, steem_instance=self.steem) account = Account(account, steem_instance=self.steem)
assert permission in account, "Could not access %s of account %s"%(permission+account["name"]) assert permission in account, "Could not access permission"
required_treshold = account[permission]["weight_threshold"] required_treshold = account[permission]["weight_threshold"]
...@@ -137,7 +137,9 @@ class TransactionBuilder(dict): ...@@ -137,7 +137,9 @@ class TransactionBuilder(dict):
) )
) )
else: else:
account = Account(account, steem_instance=self.steem) if isinstance(account, str):
account = Account(account, steem_instance=self.steem)
assert permission in account, "Could not access permission"
required_treshold = account[permission]["weight_threshold"] required_treshold = account[permission]["weight_threshold"]
keys = fetchkeys(account, permission) keys = fetchkeys(account, permission)
if permission != "owner": if permission != "owner":
......
...@@ -21,7 +21,7 @@ class Testcases(unittest.TestCase): ...@@ -21,7 +21,7 @@ class Testcases(unittest.TestCase):
self.bts = Steem( self.bts = Steem(
"wss://testnet.steem.vc", "wss://testnet.steem.vc",
nobroadcast=True, nobroadcast=True,
unsigned = True, # unsigned = True,
keys={"active": wif, "owner": wif, "memo": wif}, keys={"active": wif, "owner": wif, "memo": wif},
) )
# from getpass import getpass # from getpass import getpass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment