-
Notifications
You must be signed in to change notification settings - Fork 77
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
Showing
3 changed files
with
14 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -380,7 +380,8 @@ def test_make_profile(self): | |
owner = Owner.objects.get(user__username="[email protected]") | ||
self.assertEqual(owner.affiliation, "teacher") | ||
|
||
""" Test if user can be staff when SHIBBOLETH_STAFF_ALLOWED_DOMAINS is restricted """ | ||
""" Test if user can be staff when SHIBBOLETH_STAFF_ALLOWED_DOMAINS | ||
is restricted """ | ||
settings.SHIBBOLETH_STAFF_ALLOWED_DOMAINS = ( | ||
"univ-a.fr", | ||
"univ-b.fr", | ||
|
@@ -393,7 +394,8 @@ def test_make_profile(self): | |
) | ||
self.assertFalse(user.is_staff) | ||
|
||
""" Test if user become staff when SHIBBOLETH_STAFF_ALLOWED_DOMAINS is restrict and contains his domain """ | ||
""" Test if user become staff when SHIBBOLETH_STAFF_ALLOWED_DOMAINS | ||
is restrict and contains his domain """ | ||
settings.SHIBBOLETH_STAFF_ALLOWED_DOMAINS = ("univ.fr",) | ||
reload(shibmiddleware) | ||
shibmiddleware.ShibbMiddleware.make_profile( | ||
|
@@ -419,7 +421,8 @@ def test_make_profile(self): | |
) | ||
self.assertTrue(user.is_staff) # Staff status is not remove | ||
|
||
""" Test if the main affiliation of this same user with new unstaffable affiliation has changed """ | ||
""" Test if the main affiliation of this same user | ||
with new unstaffable affiliation has changed """ | ||
owner = Owner.objects.get(user__username="[email protected]") | ||
self.assertEqual(owner.affiliation, "member") | ||
|
||
|
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