def test_configurable_socket(self): args = [ 'env', 'node', ZombieProxyServer.__proxy_path__(), '/tmp/zombie-custom.sock' ] with fudge.patched_context( subprocess, 'Popen', (fudge.Fake('Popen').is_callable().with_args( args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).returns(FakePopen()))): ZombieProxyServer(socket='/tmp/zombie-custom.sock')
def test_stdout_redirect_exception(self): args = [ 'env', 'node', ZombieProxyServer.__proxy_path__(), '/tmp/zombie.sock' ] fake = FakePopen() fake.stdout = None with fudge.patched_context( subprocess, 'Popen', (fudge.Fake('Popen').is_callable().with_args( args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).returns(fake))): ZombieProxyServer()
def test_configurable_socket(self): args = ['env', 'node', ZombieProxyServer.__proxy_path__(), '/tmp/zombie-custom.sock'] with fudge.patched_context( subprocess, 'Popen', (fudge.Fake('Popen'). is_callable(). with_args( args, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.STDOUT ). returns(FakePopen())) ): ZombieProxyServer(socket='/tmp/zombie-custom.sock')
def test_stdout_redirect_exception(self): args = ['env', 'node', ZombieProxyServer.__proxy_path__(), '/tmp/zombie.sock'] fake = FakePopen() fake.stdout = None with fudge.patched_context( subprocess, 'Popen', (fudge.Fake('Popen'). is_callable(). with_args( args, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.STDOUT ). returns(fake)) ): ZombieProxyServer()