Commit f5539effbb0c61acb6a5bf368aedab06b2b9abe9
1 parent
ecf3c7d46a
Exists in
master
Fixed a regex group capture bug in PasswordResetTests
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
flashcards/tests/test_api.py
View file @
f5539ef
... | ... | @@ -64,8 +64,8 @@ |
64 | 64 | |
65 | 65 | capture = search('https://flashy.cards/app/reset_password/(\d+)/(.*)', |
66 | 66 | mail.outbox[0].body) |
67 | - data['uid'] = capture.group(0) | |
68 | - data['token'] = capture.group(1) | |
67 | + data['uid'] = capture.group(1) | |
68 | + data['token'] = capture.group(2) | |
69 | 69 | self.client.patch(url, patch_data, format='json') |
70 | 70 | user = User.objects.get(id=data['uid']) |
71 | 71 | assert user.check_password(data['new_password']) |