Updated test case to take the `id` field into account.

This commit is contained in:
Tristan B. Kildaire 2020-05-14 00:41:24 +02:00
parent fc33bd0b69
commit 89f51e5944
1 changed files with 2 additions and 2 deletions

View File

@ -8,14 +8,14 @@ def sendAs(username):
d.connect(("127.0.0.1",2223))
# First do it and authenticate
bys=json.dumps({"header":{"authentication":{"username":username, "password":"passwd"}, "scope":"client"},"payload":{"data":{"bruhMsg":input("Enter message naaier: ")},"type":"type1"}})
bys=json.dumps({"header":{"authentication":{"username":username, "password":"passwd"}, "scope":"client"},"payload":{"data":{"bruhMsg":input("Enter message naaier: ")},"type":"type1", "id" : "lol"}})
print(len(bys), bys)
d.send(len(bys).to_bytes(4, "little"))
d.send(bys.encode())
# Loop prompt and sending of message to tbk
while True:
bys=json.dumps({"header":{"authentication":{"username":"ddd", "password":"passwd"}, "scope":"client"},"payload":{"data":{"bruhMsg":input("Enter message naaier: ")},"type":"type1"}})
bys=json.dumps({"header":{"authentication":{"username":"ddd", "password":"passwd"}, "scope":"client"},"payload":{"data":{"bruhMsg":input("Enter message naaier: ")},"type":"type1", "id":"lol"}})
print(len(bys), bys)
d.send(len(bys).to_bytes(4, "little"))
d.send(bys.encode())