Пример #1
0
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
Пример #2
0
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
Пример #3
0
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
Пример #4
0
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
Пример #5
0
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'
Пример #6
0
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'