diff --git a/passbook/core/tests/test_views_overview.py b/passbook/core/tests/test_views_overview.py index 0edae05db..4d2bc3f52 100644 --- a/passbook/core/tests/test_views_overview.py +++ b/passbook/core/tests/test_views_overview.py @@ -23,8 +23,20 @@ class TestOverviewViews(TestCase): ) self.client.force_login(self.user) + def test_shell(self): + """Test shell""" + self.assertEqual( + self.client.get(reverse("passbook_core:shell")).status_code, 200 + ) + def test_overview(self): - """Test UserSettingsView""" + """Test overview""" self.assertEqual( self.client.get(reverse("passbook_core:overview")).status_code, 200 ) + + def test_user_settings(self): + """Test user settings""" + self.assertEqual( + self.client.get(reverse("passbook_core:user-settings")).status_code, 200 + ) diff --git a/passbook/flows/tests/test_views.py b/passbook/flows/tests/test_views.py index 7471d17ca..1dcec6116 100644 --- a/passbook/flows/tests/test_views.py +++ b/passbook/flows/tests/test_views.py @@ -207,7 +207,7 @@ class TestFlowExecutor(TestCase): # We do this request without the patch, so the policy results in false response = self.client.post(exec_url) self.assertEqual(response.status_code, 302) - self.assertEqual(response.url, reverse("passbook_core:overview")) + self.assertEqual(response.url, reverse("passbook_core:shell")) def test_reevaluate_remove_middle(self): """Test planner with re-evaluate (middle stage is removed)""" @@ -273,7 +273,7 @@ class TestFlowExecutor(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) def test_reevaluate_remove_consecutive(self): @@ -349,5 +349,5 @@ class TestFlowExecutor(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) diff --git a/passbook/flows/views.py b/passbook/flows/views.py index 8d894eb95..0faa01aaf 100644 --- a/passbook/flows/views.py +++ b/passbook/flows/views.py @@ -144,7 +144,7 @@ class FlowExecutorView(View): # Since this is wrapped by the ExecutorShell, the next argument is saved in the session # extract the next param before cancel as that cleans it next_param = self.request.session.get(SESSION_KEY_GET, {}).get( - NEXT_ARG_NAME, "passbook_core:overview" + NEXT_ARG_NAME, "passbook_core:shell" ) self.cancel() return redirect_with_qs(next_param) @@ -248,7 +248,7 @@ class CancelView(View): if SESSION_KEY_PLAN in request.session: del request.session[SESSION_KEY_PLAN] LOGGER.debug("Canceled current plan") - return redirect("passbook_core:overview") + return redirect("passbook_core:shell") class ToDefaultFlow(View): diff --git a/passbook/providers/oauth2/templates/providers/oauth2/end_session.html b/passbook/providers/oauth2/templates/providers/oauth2/end_session.html index e0fad05ce..3a05087ad 100644 --- a/passbook/providers/oauth2/templates/providers/oauth2/end_session.html +++ b/passbook/providers/oauth2/templates/providers/oauth2/end_session.html @@ -22,7 +22,7 @@ You've logged out of {{ application }}. {% endblocktrans %}
- {% trans 'Go back to overview' %} + {% trans 'Go back to overview' %} {% trans 'Log out of passbook' %} diff --git a/passbook/recovery/views.py b/passbook/recovery/views.py index cc0ccacb8..561e14e95 100644 --- a/passbook/recovery/views.py +++ b/passbook/recovery/views.py @@ -21,4 +21,4 @@ class UseTokenView(View): login(request, token.user, backend="django.contrib.auth.backends.ModelBackend") token.delete() messages.warning(request, _("Used recovery-link to authenticate.")) - return redirect("passbook_core:overview") + return redirect("passbook_core:shell") diff --git a/passbook/stages/captcha/tests.py b/passbook/stages/captcha/tests.py index c82abdd95..1eeec13db 100644 --- a/passbook/stages/captcha/tests.py +++ b/passbook/stages/captcha/tests.py @@ -51,5 +51,5 @@ class TestCaptchaStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) diff --git a/passbook/stages/consent/tests.py b/passbook/stages/consent/tests.py index 5e3842822..33d0eb3c7 100644 --- a/passbook/stages/consent/tests.py +++ b/passbook/stages/consent/tests.py @@ -51,7 +51,7 @@ class TestConsentStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) self.assertFalse(UserConsent.objects.filter(user=self.user).exists()) @@ -82,7 +82,7 @@ class TestConsentStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) self.assertTrue( UserConsent.objects.filter( @@ -119,7 +119,7 @@ class TestConsentStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) self.assertTrue( UserConsent.objects.filter( diff --git a/passbook/stages/dummy/tests.py b/passbook/stages/dummy/tests.py index e1f9e6668..c87123e6f 100644 --- a/passbook/stages/dummy/tests.py +++ b/passbook/stages/dummy/tests.py @@ -49,7 +49,7 @@ class TestDummyStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) def test_form(self): diff --git a/passbook/stages/email/tests.py b/passbook/stages/email/tests.py index 27b668bc3..0bb2ca4d6 100644 --- a/passbook/stages/email/tests.py +++ b/passbook/stages/email/tests.py @@ -117,7 +117,7 @@ class TestEmailStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) session = self.client.session diff --git a/passbook/stages/identification/tests.py b/passbook/stages/identification/tests.py index ff0712f76..792cf8d52 100644 --- a/passbook/stages/identification/tests.py +++ b/passbook/stages/identification/tests.py @@ -59,7 +59,7 @@ class TestIdentificationStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) def test_invalid_with_username(self): diff --git a/passbook/stages/invitation/tests.py b/passbook/stages/invitation/tests.py index 150f3dc7c..910090778 100644 --- a/passbook/stages/invitation/tests.py +++ b/passbook/stages/invitation/tests.py @@ -89,7 +89,7 @@ class TestUserLoginStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) self.stage.continue_flow_without_invitation = False @@ -128,5 +128,5 @@ class TestUserLoginStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) diff --git a/passbook/stages/password/tests.py b/passbook/stages/password/tests.py index 6eccc03c1..f616b16e3 100644 --- a/passbook/stages/password/tests.py +++ b/passbook/stages/password/tests.py @@ -110,7 +110,7 @@ class TestPasswordStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) def test_invalid_password(self): diff --git a/passbook/stages/prompt/tests.py b/passbook/stages/prompt/tests.py index 3b823c62e..2aeec29d5 100644 --- a/passbook/stages/prompt/tests.py +++ b/passbook/stages/prompt/tests.py @@ -165,7 +165,7 @@ class TestPromptStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) # Check that valid data has been saved diff --git a/passbook/stages/user_delete/tests.py b/passbook/stages/user_delete/tests.py index 6762ea627..3426a1203 100644 --- a/passbook/stages/user_delete/tests.py +++ b/passbook/stages/user_delete/tests.py @@ -89,7 +89,7 @@ class TestUserDeleteStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) self.assertFalse(User.objects.filter(username=self.username).exists()) diff --git a/passbook/stages/user_login/tests.py b/passbook/stages/user_login/tests.py index fe1b8a978..0433121f1 100644 --- a/passbook/stages/user_login/tests.py +++ b/passbook/stages/user_login/tests.py @@ -55,7 +55,7 @@ class TestUserLoginStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) @patch( diff --git a/passbook/stages/user_logout/tests.py b/passbook/stages/user_logout/tests.py index 54b35760c..4f219c530 100644 --- a/passbook/stages/user_logout/tests.py +++ b/passbook/stages/user_logout/tests.py @@ -51,7 +51,7 @@ class TestUserLogoutStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) def test_form(self): diff --git a/passbook/stages/user_write/tests.py b/passbook/stages/user_write/tests.py index c82c0755a..ccb5e5ea8 100644 --- a/passbook/stages/user_write/tests.py +++ b/passbook/stages/user_write/tests.py @@ -63,7 +63,7 @@ class TestUserWriteStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) user_qs = User.objects.filter( username=plan.context[PLAN_CONTEXT_PROMPT]["username"] @@ -101,7 +101,7 @@ class TestUserWriteStage(TestCase): self.assertEqual(response.status_code, 200) self.assertJSONEqual( force_str(response.content), - {"type": "redirect", "to": reverse("passbook_core:overview")}, + {"type": "redirect", "to": reverse("passbook_core:shell")}, ) user_qs = User.objects.filter( username=plan.context[PLAN_CONTEXT_PROMPT]["username"]