Fix balance adress check

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Serhy 2020-02-27 18:52:31 +02:00 committed by Churikova Tetiana
parent 3ad9cfa269
commit de8d109ba1
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
2 changed files with 5 additions and 4 deletions

View File

@ -119,11 +119,12 @@ class NetworkApi(object):
def faucet_backup(self, address): def faucet_backup(self, address):
return requests.request('GET', '%s/0x%s' % (self.faucet_backup_url, address)).json() return requests.request('GET', '%s/0x%s' % (self.faucet_backup_url, address)).json()
def get_donate(self, address, wait_time=300): def get_donate(self, address, external_faucet=True, wait_time=300):
initial_balance = self.get_balance(address) initial_balance = self.get_balance(address)
counter = 0 counter = 0
if initial_balance < 1000000000000000000: if initial_balance < 1000000000000000000:
self.faucet_backup(address) if external_faucet:
self.faucet_backup(address)
response = self.faucet(address) response = self.faucet(address)
while True: while True:
if counter >= wait_time: if counter >= wait_time:

View File

@ -162,13 +162,13 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
wallet_view.set_up_wallet() wallet_view.set_up_wallet()
address = wallet_view.get_wallet_address()[2:] address = wallet_view.get_wallet_address()[2:]
self.network_api.get_donate(address) self.network_api.get_donate(address, False)
wallet_view.wait_balance_is_equal_expected_amount() wallet_view.wait_balance_is_equal_expected_amount()
recipient = "0x"+basic_user['address'] recipient = "0x"+basic_user['address']
sending_amount = "0.08" sending_amount = "0.08"
asset = 'ETHro' asset = 'ETHro'
wallet_view.send_transaction(asset_name='ETH', amount=sending_amount, recipient=recipient, sign_transaction=True) wallet_view.send_transaction(asset_name='ETH', amount=sending_amount, recipient=recipient, sign_transaction=True)
wallet_view.wait_balance_is_changed(asset, wallet_view.get_asset_amount_by_name(asset)) wallet_view.wait_balance_is_changed(asset, initial_balance="0.1")
transactions_view = wallet_view.transaction_history_button.click() transactions_view = wallet_view.transaction_history_button.click()
transactions_view.transactions_table.find_transaction(amount=sending_amount) transactions_view.transactions_table.find_transaction(amount=sending_amount)
transactions_view.transactions_table.find_transaction(amount="0.1") transactions_view.transactions_table.find_transaction(amount="0.1")