コード例 #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
ファイル: test_automation.py プロジェクト: gradecke/checkmk
 def test_execute_cmk_automation_post_21(self,
                                         monkeypatch: pytest.MonkeyPatch):
     automation.ModeAutomation()._execute_cmk_automation()
     assert response.get_data() == b"((1, 2), 'abc')"