コード例 #1
0
ファイル: test_utils.py プロジェクト: jenner/ramlfications
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
コード例 #2
0
ファイル: test_utils.py プロジェクト: jenner/ramlfications
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)
コード例 #3
0
ファイル: test_utils.py プロジェクト: jenner/ramlfications
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
コード例 #4
0
ファイル: test_utils.py プロジェクト: PiDelport/ramlfications
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
コード例 #5
0
ファイル: test_utils.py プロジェクト: PiDelport/ramlfications
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)
コード例 #6
0
ファイル: test_utils.py プロジェクト: PiDelport/ramlfications
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