Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_success_reader_alot(prefix='', offset=0):
mock = MockReader()
for x in range(2, 200):
rnd = int(random() * x)
mock.data.append((x + offset, prefix + random_string(1 + rnd), 1, r(), r(), r(), 200, '', '', 0))
return mock
def get_fail_reader_alot(offset=0):
mock = MockReader()
for x in range(2, 200):
rnd = int(random() * x)
mock.data.append((x + offset, "first", 1, r(), r(), r(), 200, (random_string(1 + rnd)), '', 0))
return mock
def random_url(target_len):
base = 'http://site.com/?foo='
return base + random_string(target_len - len(base))