diff --git a/testing/testSuite.py b/testing/testSuite.py index 60135e0..d4a5af5 100644 --- a/testing/testSuite.py +++ b/testing/testSuite.py @@ -2,12 +2,14 @@ import socket import json +usernameSelect = input("Enter username: ") + def basicTest(): d=socket.socket(socket.AF_INET, socket.SOCK_STREAM) d.connect(("127.0.0.1",2223)) # First do it and authenticate - bys=json.dumps({"header":{"authentication":{"username":"tbk", "password":"passwd"}, "scope":"client"},"payload":{"data":"ABBA","type":"type1"}}) + bys=json.dumps({"header":{"authentication":{"username":usernameSelect, "password":"passwd"}, "scope":"client"},"payload":{"data":"ABBA","type":"type1"}}) print(len(bys), bys) d.send(len(bys).to_bytes(4, "little")) d.send(bys.encode()) diff --git a/testing/unixSock.py b/testing/unixSock.py index c8891d2..5a946c0 100644 --- a/testing/unixSock.py +++ b/testing/unixSock.py @@ -11,7 +11,7 @@ def runTest(): bys = json.dumps({ "header" : { "status" : "0", - "command" : {"type" : "sendClients", "data": ["usr1", "usr2"]} + "command" : {"type" : "sendClients", "data": ["tbk", "tbk"]} } }) print(s.send(bytes([len(bys),0,0,0]))) print(s.send(bys.encode()))