Esempio n. 1
0
    def setUp(self):
        patcher = patch('stretch.agent.client.requests')
        self.requests = patcher.start()
        self.addCleanup(patcher.stop)

        patcher = patch_settings('STRETCH_AGENT_CERT', '/cert.pem')
        patcher.start()
        self.addCleanup(patcher.stop)

        self.host = mock_attr(address='127.0.0.1')
        self.host.environment = mock_attr(name='env', pk=2)
        self.host.environment.app_paths = {'node': '/path'}
        self.client = AgentClient(self.host)
Esempio n. 2
0
 def agent(self):
     return AgentClient(self.address)