diff options
author | Torsten Grote <t@grobox.de> | 2020-07-29 09:33:41 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2020-07-29 09:33:41 -0300 |
commit | 9a4cbcd9549fee9865a537ed5236e2a2ebe52cf1 (patch) | |
tree | 168d5b606dfab4e12629d13ecb6ee5a23dd70c17 /tests/components | |
parent | 7e34b6699a77620b148b167e6aa12d50cc7456e5 (diff) | |
download | wallet-core-9a4cbcd9549fee9865a537ed5236e2a2ebe52cf1.tar.xz |
Add more checks to new withdrawal API test
Diffstat (limited to 'tests/components')
-rw-r--r-- | tests/components/bank.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/components/bank.py b/tests/components/bank.py index ee2d6e923..f6551b491 100644 --- a/tests/components/bank.py +++ b/tests/components/bank.py @@ -1,21 +1,20 @@ import os +import secrets +from dataclasses import dataclass from subprocess import run import psutil - import requests -import secrets - from .taler_service import TalerService -from dataclasses import dataclass @dataclass class BankUser: username: str password: str + @dataclass class WithdrawUriResponse: taler_withdraw_uri: str @@ -71,10 +70,10 @@ class Bank(TalerService): withdrawal_id=rj["withdrawal_id"], ) - def confirm_withdrawal(self, bankuser, withdrawal_id): - auth = (bankuser.username, bankuser.password) - resp = requests.post( - f"{self.url}accounts/{bankuser.username}/withdrawals/{withdrawal_id}/confirm", + def confirm_withdrawal(self, bank_user, withdrawal_id): + auth = (bank_user.username, bank_user.password) + requests.post( + f"{self.url}accounts/{bank_user.username}/withdrawals/{withdrawal_id}/confirm", auth=auth ) |