MCPcopy
hub / github.com/deadc0de6/dotdrop / fake_config

Function fake_config

tests/test_jhelpers.py:17–32  ·  view source on GitHub ↗

Create a fake config file

(path, dotfile, profile, dotpath)

Source from the content-addressed store, hash-verified

15
16
17def fake_config(path, dotfile, profile, dotpath):
18 """Create a fake config file"""
19 with open(path, 'w', encoding='utf-8') as file:
20 file.write('config:\n')
21 file.write(' backup: true\n')
22 file.write(' create: true\n')
23 file.write(f' dotpath: {dotpath}\n')
24 file.write('dotfiles:\n')
25 file.write(f' {dotfile.key}:\n')
26 file.write(f' dst: {dotfile.dst}\n')
27 file.write(f' src: {dotfile.src}\n')
28 file.write('profiles:\n')
29 file.write(f' {profile}:\n')
30 file.write(' dotfiles:\n')
31 file.write(f' - {dotfile.key}\n')
32 return path
33
34
35class TestJhelpers(unittest.TestCase):

Callers 1

test_jhelpersMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected