Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
 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"])