# Path: f5_heat/resources/f5_ltm_virtualserver.py
# class F5LTMVirtualServer(resource.Resource, F5BigIPMixin):
#     PROPERTIES = (
#         NAME,
#         BIGIP_SERVER,
#         PARTITION,
#         IP,
#         PORT,
#         DEFAULT_POOL,
#         VLANS
#     ) = (
#         'name',
#         'bigip_server',
#         'partition',
#         'ip',
#         'port',
#         'default_pool',
#         'vlans'
#     )
#     def handle_create(self):
#     def handle_delete(self):
# def resource_mapping():


from f5_heat.resources import f5_ltm_virtualserver
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
            vlansEnabled=True
        )


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


def test_handle_delete(F5LTMVirtualServerExists):
    assert F5LTMVirtualServerExists.handle_delete() is True
    assert F5LTMVirtualServerExists.bigip.tm.ltm.virtuals.virtual.load.\
        call_args == mock.call(
            name=u'testing_vs',
            partition='Common'
        )


def test_handle_delete_no_exists(F5LTMVirtualServerNoExists):
    assert F5LTMVirtualServerNoExists.handle_delete() is True


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


def test_resource_mapping():

# Path: f5_heat/resources/f5_ltm_virtualserver.py
# class F5LTMVirtualServer(resource.Resource, F5BigIPMixin):
#     PROPERTIES = (
#         NAME,
#         BIGIP_SERVER,
#         PARTITION,
#         IP,
#         PORT,
#         DEFAULT_POOL,
#         VLANS
#     ) = (
#         'name',
#         'bigip_server',
#         'partition',
#         'ip',
#         'port',
#         'default_pool',
#         'vlans'
#     )
#     def handle_create(self):
#     def handle_delete(self):
# def resource_mapping():


# Path: f5_heat/resources/test/test_f5_ltm_virtualserver.py
from f5_heat.resources import f5_ltm_virtualserver
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

            vlansEnabled=True
        )


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


def test_handle_delete(F5LTMVirtualServerExists):
    assert F5LTMVirtualServerExists.handle_delete() is True
    assert F5LTMVirtualServerExists.bigip.tm.ltm.virtuals.virtual.load.\
        call_args == mock.call(
            name=u'testing_vs',
            partition='Common'
        )


def test_handle_delete_no_exists(F5LTMVirtualServerNoExists):
    assert F5LTMVirtualServerNoExists.handle_delete() is True


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


def test_resource_mapping():

    rsrc_map = f5_ltm_virtualserver.resource_mapping()