-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated tests for using a single login
Signed-off-by: Cédric Foellmi <[email protected]>
- Loading branch information
1 parent
496b890
commit 72f46a4
Showing
7 changed files
with
49 additions
and
67 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
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
from arcsecond import Arcsecond | ||
from arcsecond import ArcsecondAPI | ||
from tests.utils import save_test_credentials, clear_test_credentials | ||
|
||
|
||
def test_default_empty_state(): | ||
clear_test_credentials() | ||
assert Arcsecond.is_logged_in(debug=True) is False | ||
assert Arcsecond.username(debug=True) == '' | ||
assert Arcsecond.memberships(debug=True) == {} | ||
assert ArcsecondAPI.is_logged_in(debug=True) is False | ||
assert ArcsecondAPI.username(debug=True) == '' | ||
assert ArcsecondAPI.memberships(debug=True) == {} | ||
|
||
|
||
def test_default_logged_in_state(): | ||
save_test_credentials('cedric') | ||
assert Arcsecond.is_logged_in(debug=True) is True | ||
assert Arcsecond.username(debug=True) == 'cedric' | ||
assert Arcsecond.memberships(debug=True) == {} | ||
assert ArcsecondAPI.is_logged_in(debug=True) is True | ||
assert ArcsecondAPI.username(debug=True) == 'cedric' | ||
assert ArcsecondAPI.memberships(debug=True) == {} | ||
|
||
|
||
def test_default_logged_in_with_membership_state(): | ||
save_test_credentials('cedric', {'saao': 'superadmin'}) | ||
assert Arcsecond.is_logged_in(debug=True) is True | ||
assert Arcsecond.username(debug=True) == 'cedric' | ||
assert Arcsecond.memberships(debug=True) == {'saao': 'superadmin'} | ||
assert ArcsecondAPI.is_logged_in(debug=True) is True | ||
assert ArcsecondAPI.username(debug=True) == 'cedric' | ||
assert ArcsecondAPI.memberships(debug=True) == {'saao': 'superadmin'} |
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