Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
4-dash committed Jan 22, 2025
1 parent d70f1de commit 70a655f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/feedback/tests/test_views_intern_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ def test_login_debug_auth(self):
self.assertEqual(response.status_code, 302)
self.assertEqual(response['Location'], tests.INDEX_URL)

@override_settings(DEBUG=False)
def test_login_auth(self) :
account_login_url = reverse('account_login')

response = self.client.get(tests.LOGIN_URL)

self.assertEqual(response.status_code, 302)
self.assertTrue(response['Location'].endswith(account_login_url))

response = self.client.get(account_login_url)

self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, 'socialaccount/snippets/login.html')

def test_auth_user(self) :
response = self.client.get(tests.AUTH_URL)
self.assertEqual(response.status_code, 200)
Expand Down

0 comments on commit 70a655f

Please sign in to comment.