def test_set_deployment_id(self): host = 'boo' secret = 'baz' # The function should return whatever run_with_timeout_returns. flexmock(AppControllerClient).should_receive('run_with_timeout')\ .and_return() acc = AppControllerClient(host, secret) acc.get_deployment_id()
def test_get_deployment_id(self): # The function should return whatever run_with_timeout_returns. host = 'boo' secret = 'baz' deployment_id = 'foo' flexmock(AppControllerClient).should_receive('run_with_timeout')\ .and_return(deployment_id) acc = AppControllerClient(host, secret) self.assertEqual(deployment_id, acc.get_deployment_id())