X-Git-Url: https://code.delx.au/proxy/blobdiff_plain/3f1f4f365817097fb3c43608f92f8cc1aa3ea3f5..HEAD:/test_proxy.py diff --git a/test_proxy.py b/test_proxy.py index b9d4f81..a27c14a 100755 --- a/test_proxy.py +++ b/test_proxy.py @@ -290,8 +290,7 @@ class TestPermissions(SocketHelper, unittest.TestCase): try: self.init_socket() self.send(b"\x05\x01\x00") - self.assertAuthSuccess() - self.fail("Expected ConnectionResetError") + self.assertEnd() except ConnectionResetError: pass finally: @@ -370,13 +369,13 @@ class SocksServer(object): self.env = {} self.env["LISTEN_PORT"] = str(SOCKS_PORT) self.env.update(extra_env) - self.devnull = open("/dev/null", "w") + self.log_output = open("out.log", "a") def __enter__(self): self.process = subprocess.Popen( args=["./socks5server"], - stdout=self.devnull, - stderr=self.devnull, + stdout=self.log_output, + stderr=self.log_output, env=self.env, ) @@ -385,7 +384,7 @@ class SocksServer(object): return self def __exit__(self, exc_type, exc_val, exc_tb): - self.devnull.close() + self.log_output.close() self.process.terminate() self.process.wait()