2019-12-28 09:22:29 +08:00
|
|
|
diff --git a/tests/conftest.py b/tests/conftest.py
|
2021-12-04 16:12:51 +08:00
|
|
|
index 099462c..a7e1cca 100644
|
2019-12-28 09:22:29 +08:00
|
|
|
--- a/tests/conftest.py
|
|
|
|
|
+++ b/tests/conftest.py
|
2021-12-04 16:12:51 +08:00
|
|
|
@@ -26,15 +26,26 @@ def prepare_url(value):
|
2019-12-28 09:22:29 +08:00
|
|
|
return inner
|
2021-12-04 16:12:51 +08:00
|
|
|
|
|
|
|
|
|
2019-12-28 09:22:29 +08:00
|
|
|
-@pytest.fixture
|
|
|
|
|
-def httpbin(httpbin):
|
|
|
|
|
- return prepare_url(httpbin)
|
2021-12-04 16:12:51 +08:00
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-@pytest.fixture
|
|
|
|
|
-def httpbin_secure(httpbin_secure):
|
|
|
|
|
- return prepare_url(httpbin_secure)
|
|
|
|
|
-
|
2019-12-28 09:22:29 +08:00
|
|
|
+import sys
|
2021-12-04 16:12:51 +08:00
|
|
|
+
|
2019-12-28 09:22:29 +08:00
|
|
|
+if sys.version_info[0] < 3:
|
|
|
|
|
+ @pytest.fixture
|
|
|
|
|
+ def httpbin():
|
|
|
|
|
+ pytest.skip('No httpbin for Python 2')
|
2021-12-04 16:12:51 +08:00
|
|
|
+
|
2019-12-28 09:22:29 +08:00
|
|
|
+ @pytest.fixture
|
|
|
|
|
+ def httpbin_secure():
|
|
|
|
|
+ pytest.skip('No httpbin for Python 2')
|
|
|
|
|
+
|
|
|
|
|
+else:
|
|
|
|
|
+ @pytest.fixture
|
|
|
|
|
+ def httpbin(httpbin):
|
|
|
|
|
+ return prepare_url(httpbin)
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @pytest.fixture
|
|
|
|
|
+ def httpbin_secure(httpbin_secure):
|
|
|
|
|
+ return prepare_url(httpbin_secure)
|
2021-12-04 16:12:51 +08:00
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
|
def nosan_server(tmp_path_factory):
|
|
|
|
|
--
|
|
|
|
|
2.27.0
|