-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Berend Kapelle
committed
Feb 9, 2018
1 parent
02cddbb
commit e6e4897
Showing
3 changed files
with
15 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,15 +5,14 @@ | |
from logging import basicConfig | ||
|
||
from figo.credentials import CREDENTIALS | ||
from figo.credentials import DEMO_CREDENTIALS | ||
from figo.credentials import DEMO_TOKEN | ||
from figo import FigoConnection | ||
from figo import FigoSession | ||
|
||
basicConfig(level='DEBUG') | ||
|
||
PASSWORD = 'some_words' | ||
|
||
|
||
@pytest.fixture(scope='module') | ||
def new_user_id(): | ||
return "{0}[email protected]".format(uuid.uuid4()) | ||
|
@@ -49,7 +48,7 @@ def figo_session(figo_connection, new_user_id): | |
|
||
session = FigoSession(response['access_token']) | ||
|
||
task_token = session.add_account("de", ("figo", "figo"), "90090042" ) | ||
task_token = session.add_account("de", ("figo", "figo"), "90090042") | ||
state = session.get_task_state(task_token) | ||
|
||
while not (state.is_ended or state.is_erroneous): | ||
|
@@ -71,15 +70,15 @@ def account_ids(figo_session): | |
|
||
@pytest.fixture(scope='module') | ||
def giro_account(figo_session): | ||
# returns the first account from the demo bank that is of type "Girokonto" and asserts there is at least one | ||
# returns the first account from the demo bank that is of type "Girokonto" | ||
# and asserts there is at least one | ||
accs = figo_session.accounts | ||
|
||
giro_accs = [a for a in accs if a.type=="Giro account"] | ||
|
||
giro_accs = [a for a in accs if a.type == "Giro account"] | ||
assert len(giro_accs) >= 1 | ||
|
||
yield giro_accs[0] | ||
|
||
|
||
@pytest.fixture(scope='module') | ||
def access_token(figo_connection, new_user_id): | ||
figo_connection.add_user("Test", new_user_id, PASSWORD) | ||
|
@@ -89,4 +88,4 @@ def access_token(figo_connection, new_user_id): | |
yield access_token | ||
|
||
session = FigoSession(access_token) | ||
session.remove_user() | ||
session.remove_user() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters