def test_divide_into_categories_main_category(test_input, expected_category, expected_sub_category): result = _ErtDocumentation._divide_into_categories(test_input) assert expected_category in result assert expected_sub_category in result[expected_category]
def test_divide_into_categories_all_default(test_input, expected_length): result = _ErtDocumentation._divide_into_categories(test_input) assert len(result["other"]["other"]) == expected_length
def test_divide_into_categories_lower_case_job(): result = _ErtDocumentation._divide_into_categories({"job1": {}}) assert result == {}
def test_divide_into_categories_job_source(test_input, expected_source_package): categories = _ErtDocumentation._divide_into_categories(test_input) result = [docs.job_source for docs in categories["other"]["other"]] assert expected_source_package == result