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