1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00

Remove duplicated fixture

This commit is contained in:
Jair Henrique
2023-05-10 18:17:41 -03:00
parent 58329f812b
commit 77da67ef0a
4 changed files with 7 additions and 13 deletions

View File

@@ -2,7 +2,6 @@
import asyncio
import aiohttp
from aiohttp.test_utils import TestClient
async def aiohttp_request(loop, method, url, output="text", encoding="utf-8", content_type=None, **kwargs):

View File

@@ -0,0 +1,7 @@
import pytest
@pytest.fixture(params=["https", "http"])
def scheme(request):
"""Fixture that returns both http and https."""
return request.param

View File

@@ -34,12 +34,6 @@ def post(url, output="text", **kwargs):
return request("POST", url, output="text", **kwargs)
@pytest.fixture(params=["https", "http"])
def scheme(request):
"""Fixture that returns both http and https."""
return request.param
def test_status(tmpdir, scheme):
url = scheme + "://httpbin.org"
with vcr.use_cassette(str(tmpdir.join("status.yaml"))):

View File

@@ -44,12 +44,6 @@ def post(client, url, data=None, **kwargs):
return client.fetch(http.HTTPRequest(url, method="POST", **kwargs))
@pytest.fixture(params=["https", "http"])
def scheme(request):
"""Fixture that returns both http and https."""
return request.param
@pytest.mark.gen_test
def test_status_code(get_client, scheme, tmpdir):
"""Ensure that we can read the status code"""