diff --git a/tests/test_toulouse_maelis.py b/tests/test_toulouse_maelis.py index 91496a36..86b8b4a4 100644 --- a/tests/test_toulouse_maelis.py +++ b/tests/test_toulouse_maelis.py @@ -100,13 +100,15 @@ def invoice_service(requests_mock): @pytest.fixture() -def site_service(): - with ResponsesSoap( +def site_service(requests_mock): + responses_soap = ResponsesSoap( wsdl_url='https://example.org/SiteService?wsdl', wsdl_content=get_xml_file('SiteService.wsdl'), settings=Settings(strict=False, xsd_ignore_sequence_order=True), - )() as mock: - yield mock + requests_mock=requests_mock, + ) + with responses_soap() as soap_mock: + yield soap_mock @pytest.fixture(scope='module')