Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronn committed Jan 24, 2020
1 parent 6c7b53b commit 7339bcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def test_mobile_unverified_to_verified_and_back(self):
self.assertEqual(getattr(user, self.mobile_verified_field_name), False)

# Verify a token exists for the user, sign in and check verified again
callback = CallbackToken.objects.filter(user=user, is_active=True).first()
callback = CallbackToken.objects.filter(user=user, type=CallbackToken.TOKEN_TYPE_AUTH, is_active=True).first()
callback_data = {'mobile': mobile, 'token': callback}
callback_response = self.client.post(self.callback_url, callback_data)
self.assertEqual(callback_response.status_code, status.HTTP_200_OK)
Expand Down Expand Up @@ -143,7 +143,7 @@ def test_mobile_unverified_to_verified_and_back(self):
self.assertEqual(getattr(user, self.mobile_verified_field_name), False)

# Post callback token back.
verify_token = CallbackToken.objects.filter(user=user, is_active=True).first()
verify_token = CallbackToken.objects.filter(user=user, type=CallbackToken.TOKEN_TYPE_VERIFY, is_active=True).first()
self.assertNotEqual(verify_token, None)
verify_callback_response = self.client.post(self.callback_verify, {'mobile': mobile2, 'token': verify_token.key})
self.assertEqual(verify_callback_response.status_code, status.HTTP_200_OK)
Expand Down

0 comments on commit 7339bcd

Please sign in to comment.