Exemple #1
0
    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()
Exemple #2
0
    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()
Exemple #3
0
 def handle(self, app, prog, name, remaining_args):
     from celery.bin.camqadm import AMQPAdminCommand
     return AMQPAdminCommand(app=current_celery()).run(*remaining_args)