Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
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
Ejemplo n.º 4
0
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
Ejemplo n.º 5
0
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)
Ejemplo n.º 6
0
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