Beispiel #1
0
    def test_is_running(self, monkeypatch):
        def errors():
            raise IOError

        monkeypatch.setattr(hooks, "celery_has_workers", errors)
        with pytest.raises(hooks.SystemCheckError):
            assert hooks.rabbitmq_is_running()
Beispiel #2
0
    def test_is_running(self, monkeypatch):
        def errors():
            raise IOError

        monkeypatch.setattr(hooks, 'celery_has_workers', errors)
        with pytest.raises(hooks.SystemCheckError):
            assert hooks.rabbitmq_is_running()
Beispiel #3
0
 def test_is_not_running(self, monkeypatch):
     monkeypatch.setattr(hooks, "celery_has_workers", lambda: None)
     assert hooks.rabbitmq_is_running() is None
Beispiel #4
0
 def test_is_not_running(self, monkeypatch):
     monkeypatch.setattr(hooks, 'celery_has_workers', lambda: None)
     assert hooks.rabbitmq_is_running() is None