def test_validity_8(self): expect_boolean = False student_id = 16102183 error_message = '' valid_enrol_units = [] valid_enrol_dict = {} new_plan_8 = [[[{ 'credits': 25.0, 'id': 102, 'version': 200, 'course_version': '2B' }]]] self.result_validity = validity_query(new_plan_8, valid_enrol_dict, valid_enrol_units, student_id, error_message) self.assertEqual(self.result_validity, expect_boolean)
def test_validity_7(self): expect_list = [123, 777, 888, 789, 999, 741, 456, 363, 666, 369] student_id = 16102183 error_message = '' valid_enrol_units = [] valid_enrol_dict = {} new_plan_7 = [[[{ 'credits': 25.0, 'id': 123, 'version': 200, 'course_version': '2B' }, { 'credits': 25.0, 'id': 777, 'version': 200, 'course_version': '2B' }, { 'credits': 25.0, 'id': 888, 'version': 200, 'course_version': '2B' }], [{ 'credits': 25.0, 'id': 789, 'version': 200, 'course_version': '2B' }]], [[{ 'credits': 25.0, 'id': 999, 'version': 200, 'course_version': '2B' }], [{ 'credits': 25.0, 'id': 741, 'version': 200, 'course_version': '2B' }, { 'credits': 25.0, 'id': 456, 'version': 200, 'course_version': '2B' }]], [[{ 'credits': 25.0, 'id': 363, 'version': 200, 'course_version': '2B' }, { 'credits': 25.0, 'id': 666, 'version': 200, 'course_version': '2B' }], [{ 'credits': 25.0, 'id': 369, 'version': 200, 'course_version': '2B' }]]] self.result_validity = validity_query(new_plan_7, valid_enrol_dict, valid_enrol_units, student_id, error_message) self.assertEqual(valid_enrol_units, expect_list)
def test_validity_6(self): expect_boolean = False student_id = 16102183 error_message = '' valid_enrol_units = [] valid_enrol_dict = {} new_plan_6 = [[[{ 'credits': 25.0, 'id': 123, 'version': 200, 'course_version': '2B' }, { 'credits': 25.0, 'id': 777, 'version': 200, 'course_version': '2B' }, { 'credits': 25.0, 'id': 888, 'version': 200, 'course_version': '2B' }], [{ 'credits': 25.0, 'id': 789, 'version': 200, 'course_version': '2B' }]], [[{ 'credits': 25.0, 'id': 999, 'version': 200, 'course_version': '2B' }], [{ 'credits': 25.0, 'id': 741, 'version': 200, 'course_version': '2B' }, { 'credits': 25.0, 'id': 456, 'version': 200, 'course_version': '2B' }]], [[{ 'credits': 25.0, 'id': 363, 'version': 200, 'course_version': '2B' }], [{ 'credits': 25.0, 'id': 369, 'version': 200, 'course_version': '2B' }, { 'credits': 25.0, 'id': 103, 'version': 200, 'course_version': '2B' }, { 'credits': 25.0, 'id': 373, 'version': 200, 'course_version': '2B' }, { 'credits': 25.0, 'id': 104, 'version': 200, 'course_version': '2B' }, { 'credits': 25.0, 'id': 3838, 'version': 200, 'course_version': '2B' }]]] self.result_validity = validity_query(new_plan_6, valid_enrol_dict, valid_enrol_units, student_id, error_message) self.assertEqual(self.result_validity, expect_boolean)