Example #1
0
    def test_course_with_only_code_in_length_of_course(self):
        input_course = {"length_of_course": {"code": "1"}}
        expected_search_length_of_course = {}

        search_length_of_course = build_length_of_course(input_course)
        self.assertEqual(expected_search_length_of_course,
                         search_length_of_course)
Example #2
0
    def test_course_with_only_label_in_length_of_course(self):
        input_course = {"length_of_course": {"label": "1st stage"}}
        expected_search_length_of_course = {}

        search_length_of_course = build_length_of_course(input_course)
        self.assertEqual(expected_search_length_of_course,
                         search_length_of_course)
Example #3
0
    def test_course_without_length_of_course(self):
        input_course = {}
        expected_search_length_of_course = {}

        search_length_of_course = build_length_of_course(input_course)
        self.assertEqual(expected_search_length_of_course,
                         search_length_of_course)
Example #4
0
    def test_course_with_valid_length_of_course(self):
        input_course = {"length_of_course": {"code": 1, "label": "1st stage"}}

        expected_search_length_of_course = {"code": "1", "label": "1st stage"}

        search_length_of_course = build_length_of_course(input_course)
        self.assertEqual(expected_search_length_of_course,
                         search_length_of_course)