Example #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")
Example #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")
Example #3
0
def test_touch(run):
    run.expects_call().with_args("touch path")
    file.touch("path")
Example #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")
Example #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")
Example #6
0
def test_touch(run):
    run.expects_call().with_args("touch path")
    file.touch("path")