From 9a4cbcd9549fee9865a537ed5236e2a2ebe52cf1 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Wed, 29 Jul 2020 09:33:41 -0300 Subject: Add more checks to new withdrawal API test --- tests/components/bank.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'tests/components') 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 ) -- cgit v1.2.3