mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
and another attempt fixing ctests
This commit is contained in:
parent
f6a272c839
commit
9111b6e595
1 changed files with 24 additions and 0 deletions
24
tnc/test2.py
24
tnc/test2.py
|
@ -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")
|
Loading…
Reference in a new issue