示例#1
0
def test_requirements_file():
    python.installation()
    document("requirements.txt", source="tests/files/requirements.txt")
    with python.virtualenv("_env"):
        python.packages("requirements.txt")
        for line in open("tests/files/requirements.txt"):
            assert_in(line.strip(), run("pip freeze"))
示例#2
0
def test_requirements_file():
    python.installation()
    document("requirements.txt", source="tests/files/requirements.txt")
    with python.virtualenv("_env"):
        python.packages("requirements.txt")
        for line in open("tests/files/requirements.txt"):
            assert_in(line.strip(), run("pip freeze"))
示例#3
0
def test_document_owner():
    user("foo")
    document("foobar", owner="foo")
    assert_equals(sudo('stat -c "%U" foobar'), "foo")
    user("foo", state="deleted")
示例#4
0
def test_document_create():
    document("foobar")
    sudo("test -f foobar")
示例#5
0
def test_document_delete():
    document("foobar", state="deleted")
    sudo("test ! -f foobar")
示例#6
0
def test_document_create_contents():
    document("foobar", source="tests/files/hello.txt")
    contents = sudo("cat foobar")
    assert_equals(contents, "Hello World")
示例#7
0
def test_document_create_mode():
    document("foobar", mode=0600)
    assert_equals(sudo('stat -c "%a" foobar'), "600")
示例#8
0
def test_document_invalid_path():
    document("foobar", source="foo/bar/man.txt")
示例#9
0
def test_document_invalid_path():
    document("foobar", source="foo/bar/man.txt")
示例#10
0
def test_document_user():
    user("foo")
    document("bat", group="foo")
    assert_equals(sudo('stat -c "%G" bat'), "foo")
    user("foo", state="deleted")
示例#11
0
def test_link_create():
    document("foobar")
    link("foobar", "bar")
    run("test -L bar")
示例#12
0
def test_document_user():
    user("foo")
    document("bat", group="foo")
    assert_equals(sudo('stat -c "%G" bat'), "foo")
    user("foo", state="deleted")
示例#13
0
def test_document_invalid_state():
    document("foobar", state="foobar")
示例#14
0
def test_document_owner():
    user("foo")
    document("foobar", owner="foo")
    assert_equals(sudo('stat -c "%U" foobar'), "foo")
    user("foo", state="deleted")
示例#15
0
def test_document_delete():
    document("foobar", state="deleted")
    sudo("test ! -f foobar")
示例#16
0
def test_document_create():
    document("foobar")
    sudo("test -f foobar")
示例#17
0
def test_document_create_mode():
    document("foobar", mode=0600)
    assert_equals(sudo('stat -c "%a" foobar'), "600")
示例#18
0
def test_document_create_contents():
    document("foobar", source="tests/files/hello.txt")
    contents = sudo("cat foobar")
    assert_equals(contents, "Hello World")
示例#19
0
def test_document_invalid_state():
    document("foobar", state="foobar")
示例#20
0
def test_link_create():
    document("foobar")
    link("foobar", "bar")
    run("test -L bar")
示例#21
0
def test_document_directory():
    document("foobar", source="tests")
示例#22
0
def test_document_directory():
    document("foobar", source="tests")