コード例 #1
0
ファイル: browser.py プロジェクト: uchuugaka/jellypy
 def __init__(self, server=None):
     #
     # If a server isn't specified,
     # spawn a new one.
     #
     if server is None:
         server = ZombieProxyServer()
     self.client = ZombieProxyClient(server.socket)
コード例 #2
0
    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')
コード例 #3
0
    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()
コード例 #4
0
ファイル: test_client.py プロジェクト: uchuugaka/jellypy
 def setUp(self):
     super(TestServerCommunication, self).setUp()
     self.server = ZombieProxyServer()
     self.client = ZombieProxyClient()
コード例 #5
0
 def setUp(self):
     super(TestServerSpawn, self).setUp()
     self.server = ZombieProxyServer()