mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 10:28:10 +01:00
Refactor participate_tx
This commit is contained in:
@@ -371,7 +371,7 @@ class Test(unittest.TestCase):
|
||||
time.sleep(1)
|
||||
bid = swap_client.getBid(bid_id)
|
||||
if (initiate_state is None or bid.getITxState() == initiate_state) \
|
||||
and (participate_state is None or bid.participate_txn_state == participate_state):
|
||||
and (participate_state is None or bid.getPTxState() == participate_state):
|
||||
return
|
||||
raise ValueError('wait_for_bid_tx_state timed out.')
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ class Test(unittest.TestCase):
|
||||
shutil.rmtree(test_path)
|
||||
except Exception as ex:
|
||||
logger.warning('tearDownClass %s', str(ex))
|
||||
super(Test, cls).tearDownClass()
|
||||
super(Test, self).tearDownClass()
|
||||
|
||||
def test(self):
|
||||
testargs = ['basicswap-prepare', '-datadir=' + test_path]
|
||||
|
||||
@@ -20,10 +20,8 @@ import sys
|
||||
import time
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
from io import StringIO
|
||||
import logging
|
||||
import shutil
|
||||
import json
|
||||
import threading
|
||||
|
||||
import bin.basicswap_prepare as prepareSystem
|
||||
|
||||
@@ -367,7 +367,7 @@ class Test(unittest.TestCase):
|
||||
time.sleep(1)
|
||||
bid = swap_client.getBid(bid_id)
|
||||
if (initiate_state is None or bid.getITxState() == initiate_state) \
|
||||
and (participate_state is None or bid.participate_txn_state == participate_state):
|
||||
and (participate_state is None or bid.getPTxState() == participate_state):
|
||||
return
|
||||
raise ValueError('wait_for_bid_tx_state timed out.')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user