From bf7801199b740035194e8f7bd7d5c0ec81840af1 Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Sun, 26 Apr 2020 18:21:40 +0200 Subject: [PATCH] Revert test suite back to normal --- testing/testSuite.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/testing/testSuite.py b/testing/testSuite.py index f062b19..9435aae 100644 --- a/testing/testSuite.py +++ b/testing/testSuite.py @@ -6,18 +6,17 @@ def basicTest(): d=socket.socket(socket.AF_INET, socket.SOCK_STREAM) d.connect(("127.0.0.1",2223)) - while True: - # First do it and authenticate - bys=json.dumps({"header":{"authentication":{"username":"tbk", "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()) + # First do it and authenticate + bys=json.dumps({"header":{"authentication":{"username":"tbk", "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()) - # Now we can do it again (without authentication) - bys=json.dumps({"header":{},"payload":{"data":"POES","type":"type1"}}) - print(len(bys), bys) - d.send(len(bys).to_bytes(4, "little")) - d.send(bys.encode()) + # Now we can do it again (without authentication) + bys=json.dumps({"header":{},"payload":{"data":"POES","type":"type1"}}) + print(len(bys), bys) + d.send(len(bys).to_bytes(4, "little")) + d.send(bys.encode()) while True: pass d.close()