Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Fix registration test by setting WGER_SETTINGS

Roland Geider38313e94bcfa
diff --git a/wger/core/tests/test_registration.py b/wger/core/tests/test_registration.py
index 9812d0973..bd4c4d988 100644
--- a/wger/core/tests/test_registration.py
+++ b/wger/core/tests/test_registration.py
@@ -34,11 +34,11 @@ class RegistrationTestCase(WorkoutManagerTestCase):
Tests that the correct form is used depending on global
configuration settings
'''
- with self.settings(WGER_SETTINGS={'USE_RECAPTCHA': True}):
+ with self.settings(WGER_SETTINGS={'USE_RECAPTCHA': True, 'REMOVE_WHITESPACE': False}):
response = self.client.get(reverse('core:user:registration'))
self.assertIsInstance(response.context['form'], RegistrationForm)
- with self.settings(WGER_SETTINGS={'USE_RECAPTCHA': False}):
+ with self.settings(WGER_SETTINGS={'USE_RECAPTCHA': False, 'REMOVE_WHITESPACE': False}):
response = self.client.get(reverse('core:user:registration'))
self.assertIsInstance(response.context['form'], RegistrationFormNoCaptcha)