tests: fix warnings about deprecation of pytest.yield_fixture

This commit is contained in:
Benjamin Dauvergne 2021-05-07 11:09:30 +02:00
parent da0f161dc4
commit 8e9fcdeeb7
3 changed files with 5 additions and 5 deletions

View File

@ -96,13 +96,13 @@ def api_adresse_data_gouv_fr_reverse(url, request):
)
@pytest.yield_fixture
@pytest.fixture
def mock_api_adresse_data_gouv_fr_search():
with HTTMock(api_adresse_data_gouv_fr_search):
yield api_adresse_data_gouv_fr_search
@pytest.yield_fixture
@pytest.fixture
def mock_api_adresse_data_gouv_fr_reverse():
with HTTMock(api_adresse_data_gouv_fr_reverse):
yield None

View File

@ -134,7 +134,7 @@ def api_particulier_error_not_found_deregistrated(url, request):
)
@pytest.yield_fixture
@pytest.fixture
def mock_api_particulier():
with HTTMock(api_particulier_v2_avis_imposition, api_particulier_v2_situation_familiale):
yield None

View File

@ -80,13 +80,13 @@ def photon_reverse(url, request):
return response(200, CONTENT, request=request)
@pytest.yield_fixture
@pytest.fixture
def mock_photon_search():
with HTTMock(photon_search):
yield photon_search
@pytest.yield_fixture
@pytest.fixture
def mock_photon_reverse():
with HTTMock(photon_reverse):
yield None