Browse Source

Revert "server and client initial commit"

This reverts commit b9d5a799f4.
master
Wayne 5 years ago
parent
commit
8190253845
  1. 14
      conftest.py
  2. 8
      test/test_Server.py

14
conftest.py

@ -1,23 +1,13 @@
""" """
setup the fixtures for our test setup the fixtures for our test
""" """
import socketserver
import pytest import pytest
@pytest.fixture() @pytest.fixture()
def server(): def server():
""" """
starts the server
returns a fresh server instance
""" """
from src.server import Handler_TCPServer 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()
return Handler_TCPServer

8
test/test_Server.py

@ -0,0 +1,8 @@
"""
tests the server functionality
"""
def test_ping(server):
server.ping(server, "some message")
assert server.ping(server, "some message") == "PONG"
Loading…
Cancel
Save