Пример #1
0
    def test_wrong_email_and_wrong_password(self):
        mbkend = ModelBackend()

        auth_response = mbkend.authenticate('*****@*****.**', 'baz')
        self.assertEqual(auth_response, None)
Пример #2
0
    def test_right_email_and_right_password(self):
        mbkend = ModelBackend()

        auth_response = mbkend.authenticate('*****@*****.**', '123')
        self.assertEqual(auth_response, self.user)
Пример #3
0
    def test_right_username_and_wrong_password(self):
        mbkend = ModelBackend()

        auth_response = mbkend.authenticate('foo', 'baz')
        self.assertEqual(auth_response, None)
Пример #4
0
    def test_wrong_email_and_wrong_password(self):
        mbkend = ModelBackend()

        auth_response = mbkend.authenticate('*****@*****.**', 'baz')
        self.assertEqual(auth_response, None)
Пример #5
0
    def test_right_email_and_right_password(self):
        mbkend = ModelBackend()

        auth_response = mbkend.authenticate('*****@*****.**', '123')
        self.assertEqual(auth_response, self.user)
Пример #6
0
    def test_right_username_and_wrong_password(self):
        mbkend = ModelBackend()

        auth_response = mbkend.authenticate('foo', 'baz')
        self.assertEqual(auth_response, None)