Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@
setup_logging(TEST_CONFIG["LOG"])


@pytest.fixture
def current_event_loop():
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
yield loop
loop.close()
asyncio.set_event_loop(None)


class aioresponses_delayed(aioresponses): # noqa
"""
Just like aioresponses, but slightly delays POST requests.
Expand All @@ -134,6 +143,7 @@ async def close(self):
await self.session.on_close()


@pytest.mark.usefixtures("current_event_loop")
class TestShark:
def test_shark_init(self):
shark = SocketShark(TEST_CONFIG)
Expand Down Expand Up @@ -2522,6 +2532,7 @@ async def dummy_send(*args):
await shark.shutdown()


@pytest.mark.usefixtures("current_event_loop")
class TestWebsocket:
"""
Test an actual WebSocket connection.
Expand Down
6 changes: 3 additions & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading