-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from mypetyak/master
Handle unauthenticated users trying to access in-beta views
- Loading branch information
Showing
4 changed files
with
5 additions
and
2 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
Empty file.
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 |
---|---|---|
|
@@ -54,8 +54,9 @@ def test_always_allow_module(self): | |
self.assertEqual(response.status_code, 200) | ||
|
||
def test_garden_when_not_invited(self): | ||
"""Confirm that an unauthenticated user is redirected to login""" | ||
response = self.client.get(reverse('invited_only')) | ||
self.assertRedirects(response, reverse(self.redirect)) | ||
self.assertRedirects(response, setting('LOGIN_URL')) | ||
|
||
def test_using_invite(self): | ||
cary = User.objects.create_user('cary', '[email protected]', 'secret') | ||
|
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