0009-tests-remove-warning-unclosed-file.patch
tests/test_astregs.py | ||
---|---|---|
19 | 19 |
BASE_URL = 'https://test-ws-astre-gs.departement06.fr/axis2/services/' |
20 | 20 | |
21 | 21 |
def get_xml_file(filename): |
22 |
return open(os.path.join(os.path.dirname(__file__), |
|
23 |
'data', 'astregs', filename), 'rb').read() |
|
22 |
filepath = os.path.join(os.path.dirname(__file__), 'data', 'astregs', filename) |
|
23 |
with open(filepath, 'rb') as f: |
|
24 |
return f.read() |
|
24 | 25 | |
25 | 26 |
def contact_search_side_effect(wsdl_url, **kwargs): |
26 | 27 |
if 'Tiers' in wsdl_url: |
tests/test_maelis.py | ||
---|---|---|
14 | 14 | |
15 | 15 | |
16 | 16 |
def get_xml_file(filename): |
17 |
return open(os.path.join(os.path.dirname(__file__), |
|
18 |
'data', 'maelis', filename), 'rb').read() |
|
17 |
filepath = os.path.join(os.path.dirname(__file__), 'data', 'maelis', filename) |
|
18 |
with open(filepath, 'rb') as f: |
|
19 |
return f.read() |
|
19 | 20 | |
20 | 21 | |
21 | 22 |
@pytest.fixture |
22 |
- |