예제 #1
0
파일: test_stow.py 프로젝트: arecarn/dploy
def test_stow_unfolding_with_write_only_source_file(source_a, source_b, dest):
    source_file = os.path.join(source_a, 'aaa')
    utils.remove_read_permission(source_file)
    with pytest.raises(PermissionError) as e:
        dploy.stow([source_a, source_b], dest)
    assert (error.InsufficientPermissionsToSubcmdFrom(
        subcmd=SUBCMD, file=source_file).msg in str(e.value))
예제 #2
0
파일: test_link.py 프로젝트: sleach/dploy
def test_link_with_write_only_source(file_a, dest):
    dest_file = os.path.join(dest, 'file_a_link')
    utils.remove_read_permission(file_a)
    with pytest.raises(PermissionError) as e:
        dploy.link(file_a, dest_file)
    assert error.InsufficientPermissions(subcmd=SUBCMD,
                                         file=file_a).msg in str(e.value)
예제 #3
0
def test_stow_with_write_only_source(source_a, source_c, dest):
    utils.remove_read_permission(source_a)
    with pytest.raises(PermissionError) as e:
        dploy.stow([source_a, source_c], dest)
    assert (error.InsufficientPermissionsToSubcmdFrom(subcmd=SUBCMD,
                                                      file=source_a).msg
            in str(e.value))
예제 #4
0
파일: test_link.py 프로젝트: arecarn/dploy
def test_link_with_write_only_source(file_a, dest):
    dest_file = os.path.join(dest, 'file_a_link')
    utils.remove_read_permission(file_a)
    with pytest.raises(PermissionError) as e:
        dploy.link(file_a, dest_file)
    assert error.InsufficientPermissions(
        subcmd=SUBCMD, file=file_a).msg in str(e.value)
예제 #5
0
파일: test_stow.py 프로젝트: thieryl/dploy
def test_stow_with_write_only_source(source_a, source_c, dest):
    utils.remove_read_permission(source_a)
    message = str(
        error.InsufficientPermissionsToSubcmdFrom(subcmd=SUBCMD,
                                                  file=source_a))
    with pytest.raises(error.InsufficientPermissionsToSubcmdFrom,
                       match=message):
        dploy.stow([source_a, source_c], dest)
예제 #6
0
def test_stow_unfolding_with_write_only_source_file(source_a, source_b, dest):
    source_file = os.path.join(source_a, 'aaa')
    utils.remove_read_permission(source_file)
    with pytest.raises(PermissionError) as e:
        dploy.stow([source_a, source_b], dest)
    assert (error.InsufficientPermissionsToSubcmdFrom(subcmd=SUBCMD,
                                                      file=source_file).msg
            in str(e.value))
예제 #7
0
파일: test_stow.py 프로젝트: thieryl/dploy
def test_stow_with_write_only_source_file(source_a, dest):
    source_file = os.path.join(source_a, 'aaa')
    utils.remove_read_permission(source_file)
    dploy.stow([source_a], dest)
예제 #8
0
파일: test_unstow.py 프로젝트: sleach/dploy
def test_unstow_with_write_only_dest_file(source_a, dest):
    dploy.stow([source_a], dest)
    utils.remove_read_permission(os.path.join(dest, 'aaa'))
    dploy.unstow([source_a], dest)
예제 #9
0
파일: test_stow.py 프로젝트: arecarn/dploy
def test_stow_with_write_only_source_file(source_a, dest):
    source_file = os.path.join(source_a, 'aaa')
    utils.remove_read_permission(source_file)
    dploy.stow([source_a], dest)
예제 #10
0
파일: test_stow.py 프로젝트: arecarn/dploy
def test_stow_with_write_only_source(source_a, source_c, dest):
    utils.remove_read_permission(source_a)
    with pytest.raises(PermissionError) as e:
        dploy.stow([source_a, source_c], dest)
    assert (error.InsufficientPermissionsToSubcmdFrom(
        subcmd=SUBCMD, file=source_a).msg in str(e.value))
예제 #11
0
파일: test_link.py 프로젝트: thieryl/dploy
def test_link_with_write_only_source(file_a, dest):
    dest_file = os.path.join(dest, 'file_a_link')
    utils.remove_read_permission(file_a)
    message = str(error.InsufficientPermissions(subcmd=SUBCMD, file=file_a))
    with pytest.raises(error.InsufficientPermissions, match=message):
        dploy.link(file_a, dest_file)