def testThrottle(self): """Calling the same flow should raise.""" args = flow_plugin.ApiStartGetFileOperationArgs(hostname="Host", paths=["/test"]) result = self.handler.Render(args, token=self.token) self.assertIn("C.1000000000000003", result["status_url"]) with self.assertRaises(throttle.ErrorFlowDuplicate): self.handler.Render(args, token=self.token)
def testClientLookup(self): """When multiple clients match, check we run on the latest one.""" args = flow_plugin.ApiStartGetFileOperationArgs(hostname="Host", paths=["/test"]) result = self.handler.Render(args, token=self.token) self.assertIn("C.1000000000000003", result["status_url"])