예제 #1
0
def test_directory_user():
    user("foo")
    directory("/var/web/foobar", group="foo")
    assert_equals(sudo('stat -c "%G" /var/web/foobar'), "foo")
    user("foo", state="deleted")
예제 #2
0
def test_directory_no_root():
    directory("/") 
예제 #3
0
def test_directory_delete():
    directory("/var/web/foobar", state="deleted")
    sudo("test ! -d /var/web/foobar")
예제 #4
0
def test_directory_context_manager():
    with directory("/var/web/upickem"):
        assert_equals("/var/web/upickem", sudo("pwd"))
예제 #5
0
def test_directory_create():
    directory("/var/web/upickem")
    sudo("test -d /var/web/upickem")
예제 #6
0
def test_directory_create_mode():
    directory("/var/web/boom", mode=0666)
    assert_equals(sudo('stat -c "%a" /var/web/boom'), "666")
예제 #7
0
def test_directory_invalid_state():
    directory("/var/web/upickem", state="foobar")