Commit 045b4924 authored by Pawel Boening's avatar Pawel Boening Committed by Leonard Marschke

formating issues fixed

parent d50c97dc
Pipeline #6671 passed with stage
in 6 minutes and 20 seconds
......@@ -39,7 +39,7 @@ class BaseTest(unittest.TestCase):
if not form_message or isinstance(form_message, bytes):
return form_message
if form_message[-2:] == '\r\n':
message = form_message[:-2]
form_message = form_message[:-2]
if len(form_message) > 100:
form_message = '{} ..[{}x].. {}'.format(form_message[:50], len(form_message)-100, form_message[-50:])
......@@ -50,20 +50,20 @@ class BaseTest(unittest.TestCase):
if message:
if isinstance(message, str):
message = message.encode('ASCII')
message = format_message(message)
response = ''
while not response.endswith('\r\n'):
byte = self.client.recv(1)
except socket.timeout:
raise self.failureException("Timeout with message <{}>".format(message))
raise self.failureException("Timeout with message <{}>".format(format_message(message)))
if byte == b'':
raise self.failureException("No code raised, but expected {}, message <{}>".format(
expected_code, message))
expected_code, format_message(message)))
response += byte.decode('ASCII')
self.assertValueListEqual(int(response[:3]), expected_code, msg="Message <{}>".format(message))
self.assertValueListEqual(int(response[:3]), expected_code, msg="Message <{}>".format(format_message(message)))
if response[3] == '-':
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment