MCPcopy Index your code
hub / github.com/saltstack/salt / configure_loader_modules

Function configure_loader_modules

tests/pytests/unit/modules/test_mine.py:37–57  ·  view source on GitHub ↗
(mock_cache)

Source from the content-addressed store, hash-verified

35
36@pytest.fixture
37def configure_loader_modules(mock_cache):
38 mock_match = MagicMock(return_value="webserver")
39 return {
40 mine: {
41 "__salt__": {
42 "match.glob": mock_match,
43 "match.pcre": mock_match,
44 "match.list": mock_match,
45 "match.grain": mock_match,
46 "match.grain_pcre": mock_match,
47 "match.ipcidr": mock_match,
48 "match.compound": mock_match,
49 "match.pillar": mock_match,
50 "match.pillar_pcre": mock_match,
51 "data.get": lambda key: mock_cache.fetch("minions/webserver", key),
52 "data.update": lambda key, value: mock_cache.store(
53 "minions/webserver", key, value
54 ),
55 }
56 }
57 }
58
59
60def test_get_local_empty():

Callers

nothing calls this directly

Calls 2

fetchMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected