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