and another attempt fixing ctests

This commit is contained in:
DJ2LS 2023-02-10 10:14:58 +01:00
parent f6a272c839
commit 9111b6e595

View file

@ -0,0 +1,24 @@
import sock
import threading
import ujson as json
received_json =b'{"type": "command", "command": "start_beacon", "parameter": "5"}'
sock.TESTMODE = True
#sock.ThreadedTCPRequestHandler.process_tnc_commands(None, received_json)
#testserver = sock.ThreadedTCPServer(('127.0.0.1', 3000), sock.ThreadedTCPRequestHandler).serve_forever
#server_thread = threading.Thread(target=testserver.serve_forever)
#server_thread.daemon = True
#server_thread.start()
#test = sock.ThreadedTCPRequestHandler(request=sock.ThreadedTCPServer, client_address='127.0.0.1', server=None)
#sock.process_tnc_commands(received_json)
sock.ThreadedTCPRequestHandler.process_tnc_commands(None, received_json)
print("done")