def test_hrsync_localhost_inplace(self): |
h1 = HostInfo("localhost") |
events = [] |
-> rsync = HostRSync(self.source) |
h1.initgateway() |
rsync.add_target_host(h1, reporter=events.append) |
assert events |
l = [x for x in events |
if isinstance(x, repevent.HostRSyncing)] |
assert len(l) == 1 |
ev = l[0] |
assert ev.host == h1 |
assert ev.root == ev.remotepath |
l = [x for x in events |
if isinstance(x, repevent.HostRSyncRootReady)] |
assert len(l) == 1 |
ev = l[0] |
assert ev.root == self.source |
assert ev.host == h1 |