MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / _patch_registry_dir

Function _patch_registry_dir

unit-tests/test_tunnel_registry.py:27–36  ·  view source on GitHub ↗

Point tunnel_registry_dir at tmp for the duration of a test.

(testcase, tmp: Path)

Source from the content-addressed store, hash-verified

25
26
27def _patch_registry_dir(testcase, tmp: Path):
28 """Point tunnel_registry_dir at tmp for the duration of a test."""
29 patcher = mock.patch.object(
30 tunnel_registry_mod,
31 'tunnel_registry_dir',
32 return_value=tmp,
33 )
34 patcher.start()
35 testcase.addCleanup(patcher.stop)
36 tunnel_registry_mod._registry_dir_initialized = False
37
38
39class TestNormalizeBindHost(unittest.TestCase):

Callers 5

setUpMethod · 0.85
setUpMethod · 0.85
setUpMethod · 0.85
setUpMethod · 0.85

Calls 1

startMethod · 0.45

Tested by

no test coverage detected