예제 #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)