# Path: f5_heat/resources/f5_sys_iappservice.py
# LOG = logging.getLogger(__name__)
#     PROPERTIES = (
#         NAME,
#         BIGIP_SERVER,
#         PARTITION,
#         TEMPLATE_NAME,
#         TRAFFIC_GROUP,
#         VARIABLES,
#         LISTS,
#         TABLES
#     ) = (
#         'name',
#         'bigip_server',
#         'partition',
#         'template_name',
#         'traffic_group',
#         'variables',
#         'lists',
#         'tables'
#     )
# class F5SysiAppService(resource.Resource, F5BigIPMixin):
#     def __init__(self, name, defn, stack):
#     def _check_iapp_answers(self, prop_name):
#     def _build_service_dict(self):
#     def handle_create(self):
#     def handle_delete(self):
# def resource_mapping():


from f5_heat.resources import f5_sys_iappservice
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 mock_template(templ_vers, templ_class, test_templ=iapp_service_defn):
    '''Mock a Heat template for the Kilo version.'''
    templ_dict = template_format.parse(test_templ)
    return templ_dict


def create_resource_definition(templ_dict):
    '''Create resource definition.'''
    rsrc_def = rsrc_defn.ResourceDefinition(
        'test_stack',
        templ_dict['resources']['iapp_service']['type'],
        properties=templ_dict['resources']['iapp_service']['properties']
    )
    return rsrc_def


def controlled_init(test_templ):
    template_dict = mock_template(test_templ=test_templ)
    rsrc_def = create_resource_definition(template_dict)
    return template_dict, rsrc_def


@pytest.fixture
def F5SysiAppService():
    '''Instantiate the F5SysiAppService resource.'''
    template_dict = mock_template()
    rsrc_def = create_resource_definition(template_dict)
    mock_stack = mock.MagicMock()
    mock_stack.resource_by_refid().get_partition_name.return_value = 'Common'

# Path: f5_heat/resources/f5_sys_iappservice.py
# LOG = logging.getLogger(__name__)
#     PROPERTIES = (
#         NAME,
#         BIGIP_SERVER,
#         PARTITION,
#         TEMPLATE_NAME,
#         TRAFFIC_GROUP,
#         VARIABLES,
#         LISTS,
#         TABLES
#     ) = (
#         'name',
#         'bigip_server',
#         'partition',
#         'template_name',
#         'traffic_group',
#         'variables',
#         'lists',
#         'tables'
#     )
# class F5SysiAppService(resource.Resource, F5BigIPMixin):
#     def __init__(self, name, defn, stack):
#     def _check_iapp_answers(self, prop_name):
#     def _build_service_dict(self):
#     def handle_create(self):
#     def handle_delete(self):
# def resource_mapping():


# Path: f5_heat/resources/test/test_f5_sys_iappservice.py
from f5_heat.resources import f5_sys_iappservice
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 mock_template(templ_vers, templ_class, test_templ=iapp_service_defn):
    '''Mock a Heat template for the Kilo version.'''
    templ_dict = template_format.parse(test_templ)
    return templ_dict


def create_resource_definition(templ_dict):
    '''Create resource definition.'''
    rsrc_def = rsrc_defn.ResourceDefinition(
        'test_stack',
        templ_dict['resources']['iapp_service']['type'],
        properties=templ_dict['resources']['iapp_service']['properties']
    )
    return rsrc_def


def controlled_init(test_templ):
    template_dict = mock_template(test_templ=test_templ)
    rsrc_def = create_resource_definition(template_dict)
    return template_dict, rsrc_def


@pytest.fixture
def F5SysiAppService():
    '''Instantiate the F5SysiAppService resource.'''
    template_dict = mock_template()
    rsrc_def = create_resource_definition(template_dict)
    mock_stack = mock.MagicMock()
    mock_stack.resource_by_refid().get_partition_name.return_value = 'Common'

    return f5_sys_iappservice.F5SysiAppService(