コード例 #1
0
ファイル: test_factory.py プロジェクト: LilySu/ogr
def test_get_project(url, mapping, instances, force_custom_instance, result):
    project = get_project(
        url=url,
        service_mapping_update=mapping,
        custom_instances=instances,
        force_custom_instance=force_custom_instance,
    )
    assert project == result
コード例 #2
0
ファイル: test_factory.py プロジェクト: LilySu/ogr
def test_get_project_not_found(url, mapping, instances, exc_str):
    with pytest.raises(OgrException) as ex:
        _ = get_project(
            url=url, service_mapping_update=mapping, custom_instances=instances
        )
    assert exc_str in str(ex.value)