|
|
|
@ -27,6 +27,12 @@ class UserResponseTestCase(TestCase): |
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), True) |
|
|
|
|
|
|
|
# Put empty response |
|
|
|
UserResponse.objects.filter(question_id='want_which_orders').update(value="[]") |
|
|
|
|
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), False) |
|
|
|
|
|
|
|
def test_your_info(self): |
|
|
|
step = 'your_information' |
|
|
|
questions = question_step_mapping[step] |
|
|
|
@ -82,11 +88,17 @@ class UserResponseTestCase(TestCase): |
|
|
|
self.assertEqual(is_complete(step, lst), False) |
|
|
|
|
|
|
|
# All required questions with all checking question with all hidden questions |
|
|
|
create_response(user, 'other_name_you', 'Smith') |
|
|
|
create_response(user, 'other_name_you', '[["also known as","Smith"]]') |
|
|
|
|
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), True) |
|
|
|
|
|
|
|
# Put empty response |
|
|
|
UserResponse.objects.filter(question_id='other_name_you').update(value='[["also known as",""]]') |
|
|
|
|
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), False) |
|
|
|
|
|
|
|
def test_your_spouse(self): |
|
|
|
step = 'your_spouse' |
|
|
|
questions = question_step_mapping[step] |
|
|
|
@ -147,6 +159,12 @@ class UserResponseTestCase(TestCase): |
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), True) |
|
|
|
|
|
|
|
# Put empty response |
|
|
|
UserResponse.objects.filter(question_id='name_spouse').update(value="") |
|
|
|
|
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), False) |
|
|
|
|
|
|
|
def test_your_marriage(self): |
|
|
|
pass |
|
|
|
|
|
|
|
@ -165,6 +183,12 @@ class UserResponseTestCase(TestCase): |
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), True) |
|
|
|
|
|
|
|
# Put empty response |
|
|
|
UserResponse.objects.filter(question_id='no_reconciliation_possible').update(value="") |
|
|
|
|
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), False) |
|
|
|
|
|
|
|
def test_spousal_support(self): |
|
|
|
step = 'spousal_support' |
|
|
|
questions = question_step_mapping[step] |
|
|
|
@ -192,6 +216,12 @@ class UserResponseTestCase(TestCase): |
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), False) |
|
|
|
|
|
|
|
# Put empty response |
|
|
|
UserResponse.objects.filter(question_id='spouse_support_details').update(value="") |
|
|
|
|
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), False) |
|
|
|
|
|
|
|
def test_property_and_debt(self): |
|
|
|
step = 'property_and_debt' |
|
|
|
questions = question_step_mapping[step] |
|
|
|
@ -219,6 +249,12 @@ class UserResponseTestCase(TestCase): |
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), True) |
|
|
|
|
|
|
|
# Put empty response |
|
|
|
UserResponse.objects.filter(question_id='how_to_divide_property_debt').update(value="") |
|
|
|
|
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), False) |
|
|
|
|
|
|
|
def test_other_orders(self): |
|
|
|
step = 'other_orders' |
|
|
|
questions = question_step_mapping[step] |
|
|
|
@ -234,6 +270,12 @@ class UserResponseTestCase(TestCase): |
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), True) |
|
|
|
|
|
|
|
# Put empty response |
|
|
|
UserResponse.objects.filter(question_id='other_orders_detail').update(value="") |
|
|
|
|
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), False) |
|
|
|
|
|
|
|
def test_other_questions(self): |
|
|
|
pass |
|
|
|
|
|
|
|
@ -252,6 +294,12 @@ class UserResponseTestCase(TestCase): |
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), True) |
|
|
|
|
|
|
|
# Put empty response |
|
|
|
UserResponse.objects.filter(question_id='court_registry_for_filing').update(value="") |
|
|
|
|
|
|
|
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value') |
|
|
|
self.assertEqual(is_complete(step, lst), False) |
|
|
|
|
|
|
|
|
|
|
|
# Helper functions |
|
|
|
def create_response(user, question, value): |