Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(14)  |  Derive(0)  |  Import(0)

src/m/o/moztrap-HEAD/tests/view/users/test_views.py   moztrap(Download)
        res = form.submit(status=302)
 
        self.assertRedirects(res, reverse("home"))
 
 
        res = form.submit(status=302)
 
        self.assertRedirects(res, reverse("home"))
 
    def test_login_next_redirect_only_to_internal(self):
        res = form.submit(status=302)
 
        self.assertRedirects(res, reverse("manage_cases"))
 
    def test_email_login(self):
        res = form.submit(status=302)
 
        self.assertRedirects(res, reverse("home"))
 
 
            res = form.submit(status=302)
 
        self.assertRedirects(res, reverse("home"))
 
 

src/m/o/moztrap-HEAD/tests/model/test_mtadmin.py   moztrap(Download)
    def test_login_redirect(self):
        """No-user redirects to front-end login page with ?next parameter."""
        res = self.get()
 
        self.assertRedirects(res, "/users/login/?next=/admin/")
    def test_login_redirect_message(self):
        """Non-admin user redirects to login with message."""
        res = self.get(user=self.F.UserFactory.create())
 
        self.assertRedirects(res, "/users/login/?next=/admin/")
        res = self.app.get(reverse("admin:logout"), user=user)
 
        self.assertRedirects(res, "/")