Skip to content

Commit

Permalink
what is wrong with the stem api node???
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Meyer committed Apr 4, 2018
1 parent f2b96bc commit 4f156c8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
10 changes: 5 additions & 5 deletions integration_tests/bchain/getaccountdata_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pandas as pd

from trufflepig.testutils.pytest_fixtures import steem
from trufflepig.testutils.pytest_fixtures import steem, noapisteem
import trufflepig.bchain.getaccountdata as tpac


Expand All @@ -12,15 +12,15 @@ def test_find_index_offset(steem):
assert abs((target - datetime).seconds) < 3600*48


def test_shares_query(steem):
result = tpac.get_delegates_and_shares('trufflepig', steem)
def test_shares_query(noapisteem):
result = tpac.get_delegates_and_shares('trufflepig', noapisteem)

assert 'smcaterpillar' in result


def test_payouts(steem):
def test_payouts(noapisteem):
now_24 = pd.datetime.utcnow() + pd.Timedelta(days=1)
result = tpac.get_delegate_payouts('trufflepig', steem,
result = tpac.get_delegate_payouts('trufflepig', noapisteem,
now_24,
1,
0.5)
Expand Down
8 changes: 4 additions & 4 deletions integration_tests/bchain/paydelegates_test.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import pytest
import pandas as pd

from trufflepig.testutils.pytest_fixtures import steem
from trufflepig.testutils.pytest_fixtures import steem, noapisteem
import trufflepig.bchain.paydelegates as tppd
import trufflepig.bchain.postdata as tpdd
from trufflepig import config


@pytest.mark.skipif(config.ACTIVE_KEY is None, reason="needs active key")
def test_pay_delegates(steem):
def test_pay_delegates(noapisteem):

tpdd.create_wallet(steem, config.PASSWORD,
tpdd.create_wallet(noapisteem, config.PASSWORD,
config.POSTING_KEY, config.ACTIVE_KEY)

tppd.pay_delegates(account=config.ACCOUNT,
steem=steem,
steem=noapisteem,
current_datetime=pd.datetime.utcnow()#'2029-01-01'
)
5 changes: 5 additions & 0 deletions trufflepig/testutils/pytest_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ def steem():
return MPSteem(nodes=config.NODES, no_broadcast=True)


@pytest.fixture
def noapisteem():
return MPSteem(nodes=config.NODES[1:], no_broadcast=True)


@pytest.fixture
def bchain(steem):
return Blockchain(steem)
Expand Down

0 comments on commit 4f156c8

Please sign in to comment.