mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 22:24:23 +01:00
Parametrize start and end appointment offsets
Also waits an additional for transactions to be cleaned to be safe
This commit is contained in:
@@ -18,6 +18,8 @@ from pisa.conf import EXPIRY_DELTA, BTC_RPC_USER, BTC_RPC_PASSWD, BTC_RPC_HOST,
|
||||
|
||||
logging.getLogger().disabled = True
|
||||
APPOINTMENTS = 5
|
||||
START_TIME_OFFSET = 1
|
||||
END_TIME_OFFSET = 1
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
@@ -125,7 +127,7 @@ def test_do_watch(watcher):
|
||||
|
||||
# After leaving some time for the block to be mined and processed, the number of appointments should have reduced
|
||||
# by two
|
||||
sleep(TIME_BETWEEN_BLOCKS*2)
|
||||
sleep(TIME_BETWEEN_BLOCKS*(START_TIME_OFFSET+END_TIME_OFFSET + 1))
|
||||
assert len(watcher.appointments) == APPOINTMENTS - 2
|
||||
|
||||
# The rest of appointments will timeout after the end (2) + EXPIRY_DELTA
|
||||
|
||||
Reference in New Issue
Block a user