コード例 #1
0
ファイル: test_fetchers.py プロジェクト: tribe29/checkmk
 def test_detect_transport_protocol_error(self, fetcher: TCPFetcher) -> None:
     with pytest.raises(MKFetcherError, match="Unknown transport protocol: b'abc'"):
         fetcher._detect_transport_protocol(b"abc", "unused")
コード例 #2
0
ファイル: test_fetchers.py プロジェクト: tribe29/checkmk
 def test_detect_transport_protocol_empty_error(self, fetcher: TCPFetcher) -> None:
     with pytest.raises(MKFetcherError, match="Passed error message"):
         fetcher._detect_transport_protocol(b"", "Passed error message")
コード例 #3
0
ファイル: test_fetchers.py プロジェクト: tribe29/checkmk
 def test_detect_transport_protocol(self, fetcher: TCPFetcher) -> None:
     assert fetcher._detect_transport_protocol(b"02", "Unused") == TransportProtocol.SHA256