passing some tests
This commit is contained in:
@@ -12,7 +12,7 @@ nu = datetime.datetime.now()
|
||||
@override_settings(TESTING=True)
|
||||
class NewUserRegistrationTest(TestCase):
|
||||
def setUp(self):
|
||||
self.c = Client()
|
||||
self.c = Client()
|
||||
redis_connection.publish('tasks','KILL')
|
||||
|
||||
def tearDown(self):
|
||||
@@ -24,9 +24,9 @@ class NewUserRegistrationTest(TestCase):
|
||||
@patch('rowers.dataprep.workout_summary_to_df',side_effect=mock_workout_summaries)
|
||||
def test_newuser(self,mock_workout_summaries):
|
||||
form_data = {
|
||||
'first_name':'Jan',
|
||||
'last_name':'Roeiert',
|
||||
'email':'jan@loop.nl',
|
||||
'first_name':'Jan',
|
||||
'last_name':'Roeiert',
|
||||
'email':'jan@loop.nl',
|
||||
'username':'janderoeiert',
|
||||
'password1':'aapindewei2',
|
||||
'password2':'aapindewei2',
|
||||
@@ -36,16 +36,16 @@ class NewUserRegistrationTest(TestCase):
|
||||
'sex':'male',
|
||||
'next':'/rowers/list-workouts',
|
||||
'birthdate':datetime.datetime(year=1970,month=4,day=2)
|
||||
}
|
||||
}
|
||||
|
||||
form = RegistrationFormUniqueEmail(form_data)
|
||||
form = RegistrationFormUniqueEmail(form_data)
|
||||
self.assertTrue(form.is_valid())
|
||||
|
||||
response = self.c.post('/rowers/register/', form_data, follow=True)
|
||||
response = self.c.post('/rowers/register/', form_data, follow=True)
|
||||
|
||||
self.assertRedirects(response,
|
||||
self.assertRedirects(response,
|
||||
expected_url='/rowers/me/gdpr-optin/?next=/rowers/list-workouts/',
|
||||
status_code=302,target_status_code=200)
|
||||
status_code=302,target_status_code=200)
|
||||
|
||||
|
||||
url = '/rowers/me/gdpr-optin-confirm/?next=/rowers/list-workouts/'
|
||||
|
||||
Reference in New Issue
Block a user