def test_AMQPAdminCommand(self, cls): c = cls.return_value = Mock() camqadm() c.run.assert_called_with() x = AMQPAdminCommand(app=self.app) x.run() self.assertIs(cls.call_args[1]['app'], self.app) c.run.assert_called_with()
def handle(self, app, prog, name, remaining_args): from celery.bin.camqadm import AMQPAdminCommand return AMQPAdminCommand(app=current_celery()).run(*remaining_args)