forked from figo-connect/python-figo
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
print statements now python3 style, create user now uses a uuid as na…
…me to avoid race conditions during parallel testing
- Loading branch information
Berend Kapelle
committed
Mar 15, 2016
1 parent
5b671b9
commit 76bc28d
Showing
3 changed files
with
15 additions
and
10 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
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
from figo.figo import FigoConnection, FigoSession, FigoPinException | ||
from figo.models import TaskToken, TaskState, Service, LoginSettings | ||
import time | ||
from uuid import uuid4 | ||
|
||
|
||
class WriteTest(unittest.TestCase): | ||
|
@@ -31,10 +32,15 @@ def tearDownClass(cls): | |
fs.remove_user() | ||
|
||
def t_01_add_user(self): | ||
response = self.fc.add_user("Test", self.USER, self.PASSWORD) | ||
username = "{0}[email protected]".format(uuid4()) | ||
response = self.fc.add_user("Test", username, self.PASSWORD) | ||
self.assertTrue(isinstance(response, (str, unicode))) | ||
|
||
response = self.fc.credential_login(username, self.PASSWORD) | ||
session = FigoSession(response["access_token"]) | ||
session.remove_user() | ||
|
||
def test_010_add_user_and_login(self): | ||
|
||
response = self.fc.add_user_and_login("Test", self.USER, self.PASSWORD) | ||
self.assertTrue("access_token" in response) | ||
|
||
|
@@ -46,7 +52,6 @@ def test_03_get_supported_payment_services(self): | |
response = self.fc.credential_login(self.USER, self.PASSWORD) | ||
fs = FigoSession(response["access_token"]) | ||
services = fs.get_supported_payment_services("de") | ||
print services | ||
self.assertEqual(26, len(services)) | ||
self.assertTrue(isinstance(services[0], Service)) | ||
|
||
|