Commit 2f60684a authored by Leonard Marschke's avatar Leonard Marschke 👾
Browse files

make huge smaller

parent 63d75a63
Loading
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -37,15 +37,15 @@ class TestFuzzing(BaseTest):

    def test_small_input(self):
        fuzzy_input = 'A' * 10**1
        self.assertResponse(500, '{}\r\n'.format(fuzzy_input))
        self.assertResponse([x for x in range(500, 510)], '{}\r\n'.format(fuzzy_input))

    def test_big_input(self):
        fuzzy_input = 'A' * 10**3
        self.assertResponse(500, '{}\r\n'.format(fuzzy_input))
        self.assertResponse([x for x in range(500, 510)], '{}\r\n'.format(fuzzy_input))

    def test_huge_input(self):
        fuzzy_input = 'A' * 10**6
        self.assertResponse(500, '{}\r\n'.format(fuzzy_input))
        fuzzy_input = 'A' * 10**5
        self.assertResponse([x for x in range(500, 510)], '{}\r\n'.format(fuzzy_input))

    def test_sentry_issue_49(self):
        self.assertResponse(500, b'\xff\xf4\xff\xfd\x06' + "\r\n".encode('ASCII'))
        self.assertResponse([x for x in range(500, 510)], b'\xff\xf4\xff\xfd\x06' + "\r\n".encode('ASCII'))
+2 −2
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ import time


class TestServer:
    CONNECTION_TIMEOUT = 60
    CONNECTION_TIMEOUT = 20

    def __init__(self, hostname, port, container_template, docker_port, ssl_on=False, wait_up=0.5):
        self.hostname = hostname
@@ -37,7 +37,7 @@ class TestServer:
        if not self.docker_id:
            raise AssertionError('No docker ID set!')

        subprocess.run(['docker', 'kill', self.docker_id], stdout=subprocess.PIPE)
        subprocess.run(['docker', 'kill', self.docker_id], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        self.docker_id = None

    def cleanup(self):