def test_getHostconfig(prepareHostConfig): """ Test paradrop.core.config.hostconfig.getHostConfig """ from paradrop.core.config.hostconfig import getHostConfig update = MagicMock() getHostConfig(update) assert update.cache_set.called
def test_patchHostconfig(prepareHostConfig): from paradrop.core.config.hostconfig import getHostConfig update = MagicMock() update.updateType = "patchhostconfig" patch = [ {"op": "replace", "path": "/zerotier/enabled", "value": True}, {"op": "add", "path": "/zerotier/networks", "value": "e5cd7a9e1c2753e4"} ] getHostConfig(update) assert update.cache_set.called
def test_patchHostconfig(prepareHostConfig): from paradrop.core.config.hostconfig import getHostConfig update = MagicMock() update.updateType = "patchhostconfig" patch = [{ "op": "replace", "path": "/zerotier/enabled", "value": True }, { "op": "add", "path": "/zerotier/networks", "value": "e5cd7a9e1c2753e4" }] getHostConfig(update) assert update.cache_set.called