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:
parent
be62a2fda0
commit
c9fb952333
15
testing/testSuite.py
Normal file
15
testing/testSuite.py
Normal 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()
|
Loading…
Reference in a new issue