We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9e7ae2 commit 2f5cfe4Copy full SHA for 2f5cfe4
1 file changed
tests/unit/conftest.py
@@ -1,12 +1,24 @@
1
import json
2
import socket
3
+import sys
4
+import os.path as op
5
from contextlib import closing
6
from http.server import BaseHTTPRequestHandler, HTTPServer
7
from threading import Thread
8
+from unittest.mock import MagicMock
9
10
import pytest
11
12
13
+cur_dir = op.dirname(op.abspath(__file__))
14
+
15
+mock_msp = MagicMock(return_value=op.sep.join([cur_dir, "data/mock_log"]))
16
+mock_bundle_paths = MagicMock()
17
+mock_bundle_paths.make_splunkhome_path = mock_msp
18
19
+sys.modules["splunk.clilib.bundle_paths"] = mock_bundle_paths
20
21
22
@pytest.fixture(scope="session")
23
def http_mock_server():
24
with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s:
0 commit comments