Commit b3c8198c authored by Alexander Meißner's avatar Alexander Meißner

Fixed style / linter

parent 937a4b12
Pipeline #6589 failed with stage
in 4 minutes and 53 seconds
import socket
import random
import time
......@@ -6,13 +5,13 @@ from util import BaseTest
class TestDrops(BaseTest):
def assertResponse(self, expectedCode, message): # pylint: disable=invalid-name
def assertResponse(self, expectedCode, message=None): # pylint: disable=invalid-name
if isinstance(message, str):
message = message.encode('ASCII')
while len(message) > 0:
slice = random.randint(1, len(message))
self.client.send(message[0:slice])
message = message[slice:]
while message:
sliceLen = random.randint(1, len(message))
self.client.send(message[0:sliceLen])
message = message[sliceLen:]
time.sleep(random.uniform(0.01, 0.1))
self.assertResponse(expectedCode)
......
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