From 8758feaaf23d51fa30845947d77468459fcb1d6c Mon Sep 17 00:00:00 2001 From: ariannedee Date: Mon, 10 Aug 2020 14:54:39 -0700 Subject: [PATCH] Clean up test cases after removing common law requirements --- edivorce/apps/core/tests.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/edivorce/apps/core/tests.py b/edivorce/apps/core/tests.py index fc992350..a6d52905 100644 --- a/edivorce/apps/core/tests.py +++ b/edivorce/apps/core/tests.py @@ -184,11 +184,7 @@ class UserResponseTestCase(TestCase): 'question__required') self.assertEqual(is_complete(step, lst)[0], False) - # Test for marriage-like relationship - create_response(user, 'married_marriage_like', 'Living together in a marriage like relationship') - questions.append('married_marriage_like') - - # One required question + # Some required questions create_response(user, 'when_were_you_live_married_like', '12/12/2007') lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value', @@ -197,7 +193,7 @@ class UserResponseTestCase(TestCase): 'question__required') self.assertEqual(is_complete(step, lst)[0], False) - # One required question and one not shown question(shouldn't be affecting) + # Some required questions create_response(user, 'when_were_you_married', '12/12/2008') lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value', @@ -206,7 +202,7 @@ class UserResponseTestCase(TestCase): 'question__required') self.assertEqual(is_complete(step, lst)[0], False) - # Two required question and one not shown question(shouldn't be affecting) + # Some required questions create_response(user, 'marital_status_before_you', 'Never married') lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value', @@ -215,6 +211,7 @@ class UserResponseTestCase(TestCase): 'question__required') self.assertEqual(is_complete(step, lst)[0], False) + # Some required questions create_response(user, 'marital_status_before_spouse', 'Widowed') lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value', @@ -417,10 +414,6 @@ class UserResponseTestCase(TestCase): 'question__required') self.assertEqual(is_complete(step, lst)[0], False) - # Test for marriage-like relationship - create_response(user, 'married_marriage_like', 'Living together in a marriage like relationship') - questions.append('married_marriage_like') - # One required question create_response(user, 'address_to_send_official_document_street_you', '123 Cambie st') @@ -502,6 +495,7 @@ class UserResponseTestCase(TestCase): 'question__required') self.assertEqual(is_complete(step, lst)[0], False) + # All required questions create_response(user, 'divorce_take_effect_on', 'the 31st day after the date of this order') lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value', @@ -510,7 +504,7 @@ class UserResponseTestCase(TestCase): 'question__required') self.assertEqual(is_complete(step, lst)[0], True) - # Missing required question + # Missing conditional required question UserResponse.objects.filter(question_id='divorce_take_effect_on').update(value="specific date") lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value',