Beispiel #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"))
Beispiel #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"))
Beispiel #3
0
def test_document_owner():
    user("foo")
    document("foobar", owner="foo")
    assert_equals(sudo('stat -c "%U" foobar'), "foo")
    user("foo", state="deleted")
Beispiel #4
0
def test_document_create():
    document("foobar")
    sudo("test -f foobar")
Beispiel #5
0
def test_document_delete():
    document("foobar", state="deleted")
    sudo("test ! -f foobar")
Beispiel #6
0
def test_document_create_contents():
    document("foobar", source="tests/files/hello.txt")
    contents = sudo("cat foobar")
    assert_equals(contents, "Hello World")
Beispiel #7
0
def test_document_create_mode():
    document("foobar", mode=0600)
    assert_equals(sudo('stat -c "%a" foobar'), "600")
Beispiel #8
0
def test_document_invalid_path():
    document("foobar", source="foo/bar/man.txt")
Beispiel #9
0
def test_document_invalid_path():
    document("foobar", source="foo/bar/man.txt")
Beispiel #10
0
def test_document_user():
    user("foo")
    document("bat", group="foo")
    assert_equals(sudo('stat -c "%G" bat'), "foo")
    user("foo", state="deleted")
Beispiel #11
0
def test_link_create():
    document("foobar")
    link("foobar", "bar")
    run("test -L bar")
Beispiel #12
0
def test_document_user():
    user("foo")
    document("bat", group="foo")
    assert_equals(sudo('stat -c "%G" bat'), "foo")
    user("foo", state="deleted")
Beispiel #13
0
def test_document_invalid_state():
    document("foobar", state="foobar")
Beispiel #14
0
def test_document_owner():
    user("foo")
    document("foobar", owner="foo")
    assert_equals(sudo('stat -c "%U" foobar'), "foo")
    user("foo", state="deleted")
Beispiel #15
0
def test_document_delete():
    document("foobar", state="deleted")
    sudo("test ! -f foobar")
Beispiel #16
0
def test_document_create():
    document("foobar")
    sudo("test -f foobar")
Beispiel #17
0
def test_document_create_mode():
    document("foobar", mode=0600)
    assert_equals(sudo('stat -c "%a" foobar'), "600")
Beispiel #18
0
def test_document_create_contents():
    document("foobar", source="tests/files/hello.txt")
    contents = sudo("cat foobar")
    assert_equals(contents, "Hello World")
Beispiel #19
0
def test_document_invalid_state():
    document("foobar", state="foobar")
Beispiel #20
0
def test_link_create():
    document("foobar")
    link("foobar", "bar")
    run("test -L bar")
Beispiel #21
0
def test_document_directory():
    document("foobar", source="tests")
Beispiel #22
0
def test_document_directory():
    document("foobar", source="tests")