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

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

src/d/j/django-oscar-HEAD/tests/functional/dashboard/user_tests.py   django-oscar(Download)
            self.get(reset_url)
        except AppError as e:
            self.assertIn('405', e.args[0])
 
    def test_admin_can_reset_user_passwords(self):
        # Check that the reset email has been sent
        self.assertEqual(len(mail.outbox), 1)
        self.assertIn("Resetting your password", mail.outbox[0].subject)
 
        # Check that success message shows up

src/d/j/django-oscar-HEAD/tests/functional/customer/auth_tests.py   django-oscar(Download)
 
        self.assertEqual(len(mail.outbox), 1)
        self.assertIn("your password has been changed", mail.outbox[0].body)
 
    def test_cannot_access_reset_password_page(self):
        self.assertEqual(mail.outbox[0].to[0], self.email)
        self.assertEqual(User.objects.get(id=self.user.id).email, new_email)
        self.assertIn("your email address has been changed",
                      mail.outbox[0].body)