MCPcopy
hub / github.com/pimutils/vdirsyncer / test_conflict_resolution_command

Function test_conflict_resolution_command

tests/unit/cli/test_config.py:7–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5
6
7def test_conflict_resolution_command():
8 def check_call(command):
9 command, a_tmp, b_tmp = command
10 assert command == os.path.expanduser('~/command')
11 with open(a_tmp) as f:
12 assert f.read() == a.raw
13 with open(b_tmp) as f:
14 assert f.read() == b.raw
15
16 with open(b_tmp, 'w') as f:
17 f.write(a.raw)
18
19 a = Item('UID:AAAAAAA')
20 b = Item('UID:BBBBBBB')
21 assert _resolve_conflict_via_command(
22 a, b, ['~/command'], 'a', 'b',
23 _check_call=check_call
24 ).raw == a.raw

Callers

nothing calls this directly

Calls 2

ItemClass · 0.90

Tested by

no test coverage detected