예제 #1
0
 def test_execute_cmk_automation_post_21(self, monkeypatch: pytest.MonkeyPatch):
     monkeypatch.setattr(
         request,
         "headers",
         {"x-checkmk-version": "2.1.0", "x-checkmk-edition": "cee"},
     )
     automation.ModeAutomation()._execute_cmk_automation()
     assert response.get_data() == b"((1, 2), 'abc')"
예제 #2
0
 def test_execute_cmk_automation_pre_21(self, monkeypatch: pytest.MonkeyPatch):
     monkeypatch.setattr(
         request,
         "headers",
         {"x-checkmk-version": "2.0.0p10", "x-checkmk-edition": "cee"},
     )
     automation.ModeAutomation()._execute_cmk_automation()
     assert response.get_data() == b"{'field_1': (1, 2), 'field_2': 'abc'}"
예제 #3
0
 def test_execute_cmk_automation_pre_pre_major(
     self, incomp_version: str, monkeypatch: pytest.MonkeyPatch
 ):
     monkeypatch.setattr(
         request,
         "headers",
         {"x-checkmk-version": incomp_version, "x-checkmk-edition": "cee"},
     )
     with pytest.raises(MKGeneralException, match="is incompatible"):
         automation.ModeAutomation()._execute_cmk_automation()
예제 #4
0
 def test_execute_cmk_automation_post_21(self,
                                         monkeypatch: pytest.MonkeyPatch):
     automation.ModeAutomation()._execute_cmk_automation()
     assert response.get_data() == b"((1, 2), 'abc')"