From 34df86b37d6838b115e65e5f3a332344afeb86b8 Mon Sep 17 00:00:00 2001 From: Hector Fernandez Date: Wed, 1 Jul 2020 10:45:34 +0200 Subject: Changes to adapt to new way to save results in DB. Created audio test. Added protections against unexpected status in DB. --- test-cli/test/tests/qduplex_ser.py | 40 +++----------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) (limited to 'test-cli/test/tests/qduplex_ser.py') diff --git a/test-cli/test/tests/qduplex_ser.py b/test-cli/test/tests/qduplex_ser.py index 020844a..170039b 100644 --- a/test-cli/test/tests/qduplex_ser.py +++ b/test-cli/test/tests/qduplex_ser.py @@ -51,23 +51,9 @@ class Qduplex(unittest.TestCase): self.__serial1.write(test_uuid) time.sleep(0.05) # there might be a small delay if self.__serial2.inWaiting() == 0: - self.__resultlist.append( - { - "desc": "Test result", - "data": "FAILED: port {} wait timeout exceded".format(self.__port2), - "type": "string" - } - ) self.fail("failed: port {} wait timeout exceded".format(self.__port2)) else: if self.__serial2.readline() != test_uuid: - self.__resultlist.append( - { - "desc": "Test result", - "data": "FAILED: port {} write/read mismatch".format(self.__port2), - "type": "string" - } - ) self.fail("failed: port {} write/read mismatch".format(self.__port2)) time.sleep(0.05) # there might be a small delay @@ -81,33 +67,13 @@ class Qduplex(unittest.TestCase): self.__serial2.write(test_uuid) time.sleep(0.05) # there might be a small delay if self.__serial1.inWaiting() == 0: - self.__resultlist.append( - { - "desc": "Test result", - "data": "FAILED: port {} wait timeout exceded".format(self.__port1), - "type": "string" - } - ) self.fail("failed: port {} wait timeout exceded".format(self.__port1)) else: if self.__serial1.readline() != test_uuid: - self.__resultlist.append( - { - "desc": "Test result", - "data": "FAILED: port {} write/read mismatch".format(self.__port1), - "type": "string" - } - ) self.fail("failed: port {} write/read mismatch".format(self.__port1)) - # Test successful - self.__resultlist.append( - { - "desc": "Test OK", - "data": "OK", - "type": "string" - } - ) - def getresults(self): return self.__resultlist + + def gettextresult(self): + return "" -- cgit v1.1