| 123456789101112131415161718192021222324252627 | from __future__ import absolute_import, unicode_literalsimport pytestfrom case import Mockfrom celery.bin.base import Errorfrom celery.bin.list import list_from kombu.five import WhateverIOclass test_list:    def test_list_bindings_no_support(self):        l = list_(app=self.app, stderr=WhateverIO())        management = Mock()        management.get_bindings.side_effect = NotImplementedError()        with pytest.raises(Error):            l.list_bindings(management)    def test_run(self):        l = list_(app=self.app, stderr=WhateverIO())        l.run('bindings')        with pytest.raises(Error):            l.run(None)        with pytest.raises(Error):            l.run('foo')
 |