Skip to content

Commit 7339bcd

Browse files
committed
Tests
1 parent 6c7b53b commit 7339bcd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_verification.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def test_mobile_unverified_to_verified_and_back(self):
112112
self.assertEqual(getattr(user, self.mobile_verified_field_name), False)
113113

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

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

0 commit comments

Comments
 (0)