def make_mock_client(proxy_url):
     client = scheduler_client.ZookeeperSchedulerClient(
         Cluster(proxy_url=proxy_url))
     client.get_scheduler_serverset = mock.MagicMock(
         return_value=(mock_zk, service_endpoints))
     client.SERVERSET_TIMEOUT = Amount(0, Time.SECONDS)
     client._connect_scheduler = mock.MagicMock()
     return client
 def make_mock_client(proxy_url):
     client = scheduler_client.ZookeeperSchedulerClient(
         Cluster(proxy_url=proxy_url),
         user_agent='Some-User-Agent',
         _deadline=lambda x, **kws: x())
     client.get_scheduler_serverset = mock.MagicMock(
         return_value=(mock_zk, service_endpoints))
     client.SERVERSET_TIMEOUT = Amount(0, Time.SECONDS)
     client._connect_scheduler = mock.MagicMock()
     return client