committing survey
This commit is contained in:
@@ -8,7 +8,7 @@ from .statements import *
|
||||
|
||||
nu = datetime.datetime.now()
|
||||
|
||||
#@pytest.mark.django_db
|
||||
#@pytest.mark.django_db
|
||||
@override_settings(TESTING=True)
|
||||
class NewUserRegistrationTest(TestCase):
|
||||
def setUp(self):
|
||||
@@ -20,7 +20,7 @@ class NewUserRegistrationTest(TestCase):
|
||||
os.remove('rowsandall_workouts_2018-01-01_2019-01-01.csv')
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
@patch('rowers.dataprep.workout_summary_to_df',side_effect=mock_workout_summaries)
|
||||
def test_newuser(self,mock_workout_summaries):
|
||||
form_data = {
|
||||
@@ -40,11 +40,11 @@ class NewUserRegistrationTest(TestCase):
|
||||
|
||||
form = RegistrationFormUniqueEmail(form_data)
|
||||
self.assertTrue(form.is_valid())
|
||||
|
||||
|
||||
response = self.c.post('/rowers/register/', form_data, follow=True)
|
||||
|
||||
|
||||
self.assertRedirects(response,
|
||||
expected_url='/rowers/me/gdpr-optin/?next=/rowers/list-workouts/',
|
||||
expected_url='/rowers/survey/?next=/rowers/list-workouts/',
|
||||
status_code=302,target_status_code=200)
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ class NewUserRegistrationTest(TestCase):
|
||||
response = self.c.post(url,form_data)
|
||||
|
||||
self.assertTrue(response.status_code,200)
|
||||
|
||||
|
||||
url = '/rowers/me/delete/'
|
||||
|
||||
form_data = {
|
||||
@@ -84,6 +84,3 @@ class NewUserRegistrationTest(TestCase):
|
||||
self.assertRedirects(response,
|
||||
expected_url='/login/',
|
||||
status_code=302,target_status_code=200)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user