Beispiel #1
0
def test_touch_passes_attributes(run, attributes):
    run.expects_call().returns(run_result("path"))
    (attributes.expects_call().with_args("path",
                                         mode="foo",
                                         owner="bar",
                                         group="baz"))
    file.touch("path", "foo", "bar", "baz")
Beispiel #2
0
def test_touch_default_attributes(run, attributes):
    run.expects_call().returns(run_result("path"))
    (attributes.expects_call().with_args("path",
                                         mode=None,
                                         owner=None,
                                         group=None))
    file.touch("path")
Beispiel #3
0
def test_touch(run):
    run.expects_call().with_args("touch path")
    file.touch("path")
Beispiel #4
0
def test_touch_passes_attributes(run, attributes):
    run.expects_call().returns(run_result("path"))
    (attributes.expects_call().with_args("path", mode="foo", owner="bar", group="baz"))
    file.touch("path", "foo", "bar", "baz")
Beispiel #5
0
def test_touch_default_attributes(run, attributes):
    run.expects_call().returns(run_result("path"))
    (attributes.expects_call().with_args("path", mode=None, owner=None, group=None))
    file.touch("path")
Beispiel #6
0
def test_touch(run):
    run.expects_call().with_args("touch path")
    file.touch("path")