def test_parse_rsync_dict_input(): d = {'src': 'test', 'delete': True} r = parse.parse_rsync(d) assert len(r.configs) == 1 assert isinstance(r.configs[0], RsyncConfig) assert r.configs[0].src == 'test' assert r.configs[0].delete
def test_parse_rsync_list_input(): d = {'src': 'test'} l = [d for r in range(5)] r = parse.parse_rsync(l) assert len(r.configs) == 5 assert isinstance(r.configs[0], RsyncConfig) assert r.configs[0].src == 'test' assert not r.configs[0].delete
def test_parse_rsync_string_input(): r = parse.parse_rsync('test') assert len(r.configs) == 1 assert isinstance(r.configs[0], RsyncConfig) assert r.configs[0].src == 'test'