# Path: revolver/directory.py
# def temp_local():
# def temp(mode=None, owner=None, group=None):
# def remove(location, recursive=False, force=True):
# def create(path, recursive=False, mode=None, owner=None, group=None):
# 
# Path: revolver/test/utils.py
# def run_result(stdout="", stderr="", return_code=0):
#     result = fabric.operations._AttributeString(stdout)
#     result.stderr = stderr
#     result.return_code = return_code
#     result.failed = return_code != 0
#     result.succeeded = return_code == 0
#     return result


from fudge import patch
from revolver import directory
from .utils import run_result
import cuisine
# -*- coding: utf-8 -*-

from __future__ import absolute_import, division, with_statement





def test_revolver_is_just_a_wrapper():
    assert directory.attributes == cuisine.dir_attribs
    assert directory.attributes_get == cuisine.file_attribs_get
    assert directory.ensure == cuisine.dir_ensure
    assert directory.exists == cuisine.dir_exists
    assert directory.is_link == cuisine.file_is_link


@patch("revolver.directory.mkdtemp")
def test_temp_local(mkdtemp):

# Path: revolver/directory.py
# def temp_local():
# def temp(mode=None, owner=None, group=None):
# def remove(location, recursive=False, force=True):
# def create(path, recursive=False, mode=None, owner=None, group=None):
# 
# Path: revolver/test/utils.py
# def run_result(stdout="", stderr="", return_code=0):
#     result = fabric.operations._AttributeString(stdout)
#     result.stderr = stderr
#     result.return_code = return_code
#     result.failed = return_code != 0
#     result.succeeded = return_code == 0
#     return result


# Path: revolver/test/directory_test.py
from fudge import patch
from revolver import directory
from .utils import run_result
import cuisine

# -*- coding: utf-8 -*-

from __future__ import absolute_import, division, with_statement





def test_revolver_is_just_a_wrapper():
    assert directory.attributes == cuisine.dir_attribs
    assert directory.attributes_get == cuisine.file_attribs_get
    assert directory.ensure == cuisine.dir_ensure
    assert directory.exists == cuisine.dir_exists
    assert directory.is_link == cuisine.file_is_link


@patch("revolver.directory.mkdtemp")
def test_temp_local(mkdtemp):

    mkdtemp.expects_call().returns(run_result("path"))