Exemplo n.º 1
0
    def test_wrong_email_and_wrong_password(self):
        mbkend = ModelBackend()

        auth_response = mbkend.authenticate('*****@*****.**', 'baz')
        self.assertEqual(auth_response, None)
Exemplo n.º 2
0
    def test_right_email_and_right_password(self):
        mbkend = ModelBackend()

        auth_response = mbkend.authenticate('*****@*****.**', '123')
        self.assertEqual(auth_response, self.user)
Exemplo n.º 3
0
    def test_right_username_and_wrong_password(self):
        mbkend = ModelBackend()

        auth_response = mbkend.authenticate('foo', 'baz')
        self.assertEqual(auth_response, None)
Exemplo n.º 4
0
    def test_wrong_email_and_wrong_password(self):
        mbkend = ModelBackend()

        auth_response = mbkend.authenticate('*****@*****.**', 'baz')
        self.assertEqual(auth_response, None)
Exemplo n.º 5
0
    def test_right_email_and_right_password(self):
        mbkend = ModelBackend()

        auth_response = mbkend.authenticate('*****@*****.**', '123')
        self.assertEqual(auth_response, self.user)
Exemplo n.º 6
0
    def test_right_username_and_wrong_password(self):
        mbkend = ModelBackend()

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