# 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
        'F5::Sys::iAppService': f5_sys_iappservice.F5SysiAppService
    }


# The following test instantiation with a bogus template or bogus json

def test_bad_property():
    template_dict, rsrc_def = controlled_init(bad_iapp_service_defn)
    f5_sys_iappservice_obj = f5_sys_iappservice.F5SysiAppService(
        'test',
        rsrc_def,
        mock.MagicMock()
    )
    with pytest.raises(exception.StackValidationFailed):
        f5_sys_iappservice_obj.validate()


def test_valueerror_json_property():
    template_dict, rsrc_def = controlled_init(bad_valueerror_json_defn)
    with pytest.raises(ValueError):
        f5_sys_iappservice.F5SysiAppService(
            'test',
            rsrc_def,
            mock.MagicMock()
        )


def test_empty_json_property():
    template_dict, rsrc_def = controlled_init(empty_json_defn)
    with pytest.raises(ValueError):

# 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

        'F5::Sys::iAppService': f5_sys_iappservice.F5SysiAppService
    }


# The following test instantiation with a bogus template or bogus json

def test_bad_property():
    template_dict, rsrc_def = controlled_init(bad_iapp_service_defn)
    f5_sys_iappservice_obj = f5_sys_iappservice.F5SysiAppService(
        'test',
        rsrc_def,
        mock.MagicMock()
    )
    with pytest.raises(exception.StackValidationFailed):
        f5_sys_iappservice_obj.validate()


def test_valueerror_json_property():
    template_dict, rsrc_def = controlled_init(bad_valueerror_json_defn)
    with pytest.raises(ValueError):
        f5_sys_iappservice.F5SysiAppService(
            'test',
            rsrc_def,
            mock.MagicMock()
        )


def test_empty_json_property():
    template_dict, rsrc_def = controlled_init(empty_json_defn)
    with pytest.raises(ValueError):

        f5_sys_iappservice.F5SysiAppService(