Skip to content
Snippets Groups Projects
Commit a1a73025 authored by Carlos Vega's avatar Carlos Vega
Browse files

updated test for new django version 1.11.5

parent f33b810c
No related branches found
No related tags found
1 merge request!160Bug/migration problem issue 236 master
...@@ -14,8 +14,8 @@ class ContactAttemptViewTests(LoggedInWithWorkerTestCase): ...@@ -14,8 +14,8 @@ class ContactAttemptViewTests(LoggedInWithWorkerTestCase):
def test_contact_attempt_add_get(self): def test_contact_attempt_add_get(self):
subject = create_study_subject() subject = create_study_subject()
response = self.client.get(reverse('web.views.contact_add', kwargs={'subject_id': subject.id})) response = self.client.get(reverse('web.views.contact_add', kwargs={'subject_id': subject.id}))
self.assertContains(response, 'selected">{}'.format(self.worker), 1) self.assertContains(response, 'selected>{}'.format(self.worker), 1)
self.assertContains(response, 'selected">{}'.format(subject), 1) self.assertContains(response, 'selected>{}'.format(subject), 1)
def test_contact_attempt_add_post_valid(self): def test_contact_attempt_add_post_valid(self):
subject = create_study_subject() subject = create_study_subject()
......
...@@ -15,7 +15,7 @@ class TestStatisticsView(LoggedInTestCase): ...@@ -15,7 +15,7 @@ class TestStatisticsView(LoggedInTestCase):
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
current_month = datetime.now().month - 1 or 12 current_month = datetime.now().month - 1 or 12
content = response.content content = response.content
self.assertIn('<option value="{}" selected="selected">'.format(current_month), content) self.assertIn('<option value="{}" selected>'.format(current_month), content)
response = self.client.get(url, {"month": 10, "year": 2017, "subject_type": -1, "visit": -1}) response = self.client.get(url, {"month": 10, "year": 2017, "subject_type": -1, "visit": -1})
content = response.content content = response.content
self.assertIn('<option value="10" selected="selected">October', content) self.assertIn('<option value="10" selected>October', content)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment