Browse Source

added server-fixture

master
Wayne 5 years ago
parent
commit
9d0582b63c
  1. 0
      HelloWorld.py
  2. 23
      conftest.py

0
HelloWorld.py

23
conftest.py

@ -0,0 +1,23 @@
"""
setup the fixtures for our test
"""
import socketserver
import pytest
@pytest.fixture()
def server():
"""
starts the server
"""
from src.server import Handler_TCPServer
HOST, PORT = "localhost", 9999
# Init the TCP server object, bind it to the localhost on 9999 port
tcp_server = socketserver.TCPServer((HOST, PORT), Handler_TCPServer)
# Activate the TCP server.
# To abort the TCP server, press Ctrl-C.
tcp_server.serve_forever()
Loading…
Cancel
Save