# Path: f5_heat/resources/f5_sys_partition.py
# class F5SysPartition(resource.Resource, F5BigIPMixin):
#     PROPERTIES = (
#         NAME,
#         BIGIP_SERVER,
#         NAME,
#         SUBPATH
#     ) = (
#         'name',
#         'bigip_server',
#         'name',
#         'subpath'
#     )
#     def get_partition_name(self):
#     def handle_create(self):
#     def handle_delete(self):
# def resource_mapping():


from f5_heat.resources import f5_sys_partition
from heat.common import exception
from heat.common import template_format
from heat.engine.hot.template import HOTemplate20150430
from heat.engine import rsrc_defn
from heat.engine import template
import mock
import pytest
        )


def test_handle_create_error(CreatePartitionSideEffect):
    '''Currently, test exists to satisfy 100% code coverage.'''
    with pytest.raises(exception.ResourceFailure):
        CreatePartitionSideEffect.handle_create()


def test_handle_delete(F5SysPartition):
    delete_result = F5SysPartition.handle_delete()
    assert delete_result is True
    assert F5SysPartition.bigip.tm.sys.folders.folder.load.\
        call_args == mock.call(name=u'partition_test')


def test_handle_delete_error(DeletePartitionSideEffect):
    '''Currently, test exists to satisfy 100% code coverage.'''
    with pytest.raises(exception.ResourceFailure):
        DeletePartitionSideEffect.handle_delete()


def test_get_partition_name(F5SysPartition):
    partition_name = F5SysPartition.get_partition_name()
    assert partition_name == 'partition_test'


def test_resource_mapping():
    rsrc_map = f5_sys_partition.resource_mapping()
    assert rsrc_map == {

# Path: f5_heat/resources/f5_sys_partition.py
# class F5SysPartition(resource.Resource, F5BigIPMixin):
#     PROPERTIES = (
#         NAME,
#         BIGIP_SERVER,
#         NAME,
#         SUBPATH
#     ) = (
#         'name',
#         'bigip_server',
#         'name',
#         'subpath'
#     )
#     def get_partition_name(self):
#     def handle_create(self):
#     def handle_delete(self):
# def resource_mapping():


# Path: f5_heat/resources/test/test_f5_sys_partition.py
from f5_heat.resources import f5_sys_partition
from heat.common import exception
from heat.common import template_format
from heat.engine.hot.template import HOTemplate20150430
from heat.engine import rsrc_defn
from heat.engine import template
import mock
import pytest

        )


def test_handle_create_error(CreatePartitionSideEffect):
    '''Currently, test exists to satisfy 100% code coverage.'''
    with pytest.raises(exception.ResourceFailure):
        CreatePartitionSideEffect.handle_create()


def test_handle_delete(F5SysPartition):
    delete_result = F5SysPartition.handle_delete()
    assert delete_result is True
    assert F5SysPartition.bigip.tm.sys.folders.folder.load.\
        call_args == mock.call(name=u'partition_test')


def test_handle_delete_error(DeletePartitionSideEffect):
    '''Currently, test exists to satisfy 100% code coverage.'''
    with pytest.raises(exception.ResourceFailure):
        DeletePartitionSideEffect.handle_delete()


def test_get_partition_name(F5SysPartition):
    partition_name = F5SysPartition.get_partition_name()
    assert partition_name == 'partition_test'


def test_resource_mapping():
    rsrc_map = f5_sys_partition.resource_mapping()
    assert rsrc_map == {

        'F5::Sys::Partition': f5_sys_partition.F5SysPartition