Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonFZ committed May 28, 2024
1 parent 8aea471 commit d59d34e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@

import pytest
import redis
import socketio
import socketio.exceptions

from znsocket import Client, get_sio
from znsocket import Client, Server


@pytest.fixture
def eventlet_memory_server():
sio = get_sio()
port = random.randint(10000, 20000)

def start_server():
server_app = socketio.WSGIApp(sio)
eventlet.wsgi.server(eventlet.listen(("localhost", port)), server_app)
server = Server(port=port)
server.run()

thread = eventlet.spawn(start_server)

Expand Down

0 comments on commit d59d34e

Please sign in to comment.