1
0
Fork 0
mirror of https://github.com/besterprotocol/besterd synced 2023-12-13 21:00:32 +01:00

Added Python client testing suite

This commit is contained in:
Tristan B. Kildaire 2020-04-17 22:09:28 +02:00
parent be62a2fda0
commit c9fb952333

15
testing/testSuite.py Normal file
View file

@ -0,0 +1,15 @@
import socket
import json
def basicTest():
d=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
d.connect(("127.0.0.1",2223))
bys=json.dumps({"header":{"authentication":{"username":"tbk", "password":"passwd"},"type":"type1", "scope":"poes"},"payload":1})
d.send(bytes([len(bys),0,0,0]))
d.send(bys.encode())
d.close()
def runTests():
basicTest()
runTests()