Skip to content

Commit d66b234

Browse files
committed
Only use @pytest.fixture decorator once
This is now required in pytest >= 3.6 See pytest-dev/pytest#3518 Fixes #49
1 parent ddcb2f2 commit d66b234

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pytest_httpbin/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ def class_based_httpbin_secure(request, httpbin_secure):
3636
request.cls.httpbin_secure = httpbin_secure
3737

3838

39-
@pytest.fixture(scope='function')
39+
@pytest.fixture(autouse=True, scope='function')
4040
def httpbin_ca_bundle(monkeypatch):
4141
monkeypatch.setenv('REQUESTS_CA_BUNDLE', certs.where())

tests/conftest.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import pytest
22

3+
# we import this to make sure that autouse is known from the beginning
34
from pytest_httpbin.plugin import httpbin_ca_bundle
4-
5-
6-
pytest.fixture(autouse=True)(httpbin_ca_bundle)

0 commit comments

Comments
 (0)