diff --git a/python/samba/tests/blackbox/http_chunk.py b/python/samba/tests/blackbox/http_chunk.py index 175c60d98a2..150ab2a3153 100644 --- a/python/samba/tests/blackbox/http_chunk.py +++ b/python/samba/tests/blackbox/http_chunk.py @@ -99,7 +99,7 @@ class HttpChunkBlackboxTests(BlackboxTestCase): try: msg = "snglechunksnglechunksnglechunksnglechunksnglechunk" resp = self.check_output("%s -d11 -U%% -I%s --rsize 49 --uri %s" % (COMMAND, os.getenv("SERVER_IP", "localhost"), msg)) - self.fail(str(e)) + self.fail("unexpected success") except BlackboxProcessError as e: if "http_read_chunk: size 50 exceeds max content len 49 skipping body" not in e.stderr.decode('utf-8'): self.fail(str(e)) diff --git a/python/samba/tests/blackbox/http_content.py b/python/samba/tests/blackbox/http_content.py index 9ecb6ffe279..3d674aa8db7 100644 --- a/python/samba/tests/blackbox/http_content.py +++ b/python/samba/tests/blackbox/http_content.py @@ -77,7 +77,7 @@ class HttpContentBlackboxTests(BlackboxTestCase): msg = "012345678" # 9 bytes # limit response to 8 bytes resp = self.check_output("%s -d11 -U%% -I%s --rsize 8 --uri %s" % (COMMAND, os.getenv("SERVER_IP", "localhost"), msg)) - self.fail(str(e)) + self.fail("unexpected success") except BlackboxProcessError as e: if "unexpected 0 len response" not in e.stdout.decode('utf-8'): self.fail(str(e))