def test_parse_xml_data_incorrect_reg(incorrect_registry_count): with pytest.raises(utils.MediaTypeError) as e: utils._parse_xml_data(incorrect_registry_count) msg = ("Expected 9 registries but parsed 2",) assert e.value.args == msg
def test_parse_xml_data(parsed_xml, expected_data): result = utils._parse_xml_data(parsed_xml) assert result == expected_data assert len(result) == len(expected_data)
def test_parse_xml_data_no_reg(no_registries): with pytest.raises(utils.MediaTypeError) as e: utils._parse_xml_data(no_registries) msg = ("No registries found to parse.",) assert e.value.args == msg