Skip to content

Commit

Permalink
correct pytest fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
jarq6c committed Feb 10, 2025
1 parent 41c38c4 commit 30cfbf4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/_restclient/tests/test_restclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ def test_get_headers_have_precedent_over_instance(basic_test_server):
assert all(k_v_pair in r.headers.items() for k_v_pair in method_headers.items())


def test_build_url(loop):
def test_build_url(event_loop):
base_url = "http://www.test.gov/"
query_params = {"key": "value"}
with RestClient(enable_cache=False, loop=loop) as client:
with RestClient(enable_cache=False, loop=event_loop) as client:

assert client.build_url(base_url) == base_url
assert client.build_url(base_url, query_params) == f"{base_url}?key=value"
Expand All @@ -156,7 +156,7 @@ class ModuleFoundError(Exception):
...


def test_restclient_nest_asyncio_ModuleNotFoundError(loop):
def test_restclient_nest_asyncio_ModuleNotFoundError(event_loop):
"""Test for #99. Ensure ModuleNotFoundError raised if `nest_asyncio` not installed"""
import asyncio
import warnings
Expand All @@ -183,4 +183,4 @@ async def test():
# this test will need to change if `nest_asyncio` becomes a requirement
RestClient(enable_cache=False)

loop.run_until_complete(test())
event_loop.run_until_complete(test())

0 comments on commit 30cfbf4

Please sign in to comment.