GIScience / ohsome-quality-api

Data quality estimations for OpenStreetMap
https://api.quality.ohsome.org
GNU Affero General Public License v3.0
35 stars 7 forks source link

test(building-comparison): mock `get_eubucco_coverage_intersection_area` in `test_building_comparison.py` #734

Closed matthiasschaub closed 1 year ago

matthiasschaub commented 1 year ago

Something like this is missing:

@pytest.fixture(scope="class")
def mock_get_eubucco_coverage_intersection_area(class_mocker):
    async_mock = asyncmock(return_value=[{"coverage": 100}])
    class_mocker.patch(
        "ohsome_quality_api.indicators.building_completeness.indicator.db_client.get_eubucco_coverage_intersection_area",
        side_effect=async_mock,
    )