You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
486 B

  1. """
  2. setup the fixtures for our test
  3. """
  4. import socketserver
  5. import pytest
  6. @pytest.fixture()
  7. def server():
  8. """
  9. starts the server
  10. """
  11. from src.server import Handler_TCPServer
  12. HOST, PORT = "localhost", 9999
  13. # Init the TCP server object, bind it to the localhost on 9999 port
  14. tcp_server = socketserver.TCPServer((HOST, PORT), Handler_TCPServer)
  15. # Activate the TCP server.
  16. # To abort the TCP server, press Ctrl-C.
  17. tcp_server.serve_forever()