From 3d48906aeafba39e782b666e45ce1a5c60962dc9 Mon Sep 17 00:00:00 2001 From: Nicolas ROCHE Date: Fri, 20 Jan 2023 21:11:59 +0100 Subject: [PATCH] toulouse-maelis: allow using site_service with other test fixture (#73808) --- tests/test_toulouse_maelis.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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')