Self hosted FLOSS fitness/workout, nutrition and weight tracker
Fix registration tests
Roland Geider07e5aac3a4b7
diff --git a/wger/config/tests/test_gym_config.py b/wger/config/tests/test_gym_config.pyindex 0e4ac191f..461c59f14 100644--- a/wger/config/tests/test_gym_config.py+++ b/wger/config/tests/test_gym_config.py@@ -41,11 +41,12 @@ class GymConfigTestCase(WorkoutManagerTestCase):# Registerregistration_data = {'username': 'myusername',- 'password1': 'secret',- 'password2': 'secret',+ 'password1': 'Aerieth4yuv5',+ 'password2': 'Aerieth4yuv5','email': '[email protected]','g-recaptcha-response': 'PASSED', }- self.client.post(reverse('core:user:registration'), registration_data)+ response = self.client.post(reverse('core:user:registration'), registration_data)+ self.assertEqual(response.status_code, 302)new_user = User.objects.all().last()self.assertEqual(new_user.userprofile.gym, gym)@@ -62,11 +63,12 @@ class GymConfigTestCase(WorkoutManagerTestCase):# Registerregistration_data = {'username': 'myusername',- 'password1': 'secret',- 'password2': 'secret',+ 'password1': 'Iem2ahl1eizo',+ 'password2': 'Iem2ahl1eizo','email': '[email protected]','g-recaptcha-response': 'PASSED', }- self.client.post(reverse('core:user:registration'), registration_data)+ response = self.client.post(reverse('core:user:registration'), registration_data)+ self.assertEqual(response.status_code, 302)new_user = User.objects.all().last()self.assertEqual(new_user.userprofile.gym_id, None)diff --git a/wger/core/tests/test_change_password.py b/wger/core/tests/test_change_password.pyindex 1e08ed703..d35d84e04 100644--- a/wger/core/tests/test_change_password.py+++ b/wger/core/tests/test_change_password.py@@ -39,8 +39,8 @@ class ChangePasswordTestCase(WorkoutManagerTestCase):# Fill in the change password formform_data = {'old_password': 'testtest',- 'new_password1': 'secret',- 'new_password2': 'secret'}+ 'new_password1': 'shuZoh2oGu7i',+ 'new_password2': 'shuZoh2oGu7i'}response = self.client.post(reverse('core:user:change-password'), form_data)self.assertEqual(response.status_code, 302)@@ -50,7 +50,7 @@ class ChangePasswordTestCase(WorkoutManagerTestCase):if fail:self.assertTrue(user.check_password('testtest'))else:- self.assertTrue(user.check_password('secret'))+ self.assertTrue(user.check_password('shuZoh2oGu7i'))def test_change_password_anonymous(self):'''diff --git a/wger/core/tests/test_registration.py b/wger/core/tests/test_registration.pyindex cbf88ed52..8cf5322c4 100644--- a/wger/core/tests/test_registration.py+++ b/wger/core/tests/test_registration.py@@ -58,8 +58,8 @@ class RegistrationTestCase(WorkoutManagerTestCase):# Fill in the registration formregistration_data = {'username': 'myusername',- 'password1': 'secret',- 'password2': 'secret',+ 'password1': 'quai8fai7Zae',+ 'password2': 'quai8fai7Zae','email': 'not an email','g-recaptcha-response': 'PASSED', }count_before = User.objects.count()@@ -108,8 +108,8 @@ class RegistrationTestCase(WorkoutManagerTestCase):# Fill in the registration formregistration_data = {'username': 'myusername',- 'password1': 'secret',- 'password2': 'secret',+ 'password1': 'Xee4fuev1ohj',+ 'password2': 'Xee4fuev1ohj','email': '[email protected]','g-recaptcha-response': 'PASSED', }count_before = User.objects.count()