# Path: bgpvpn_dashboard/api/bgpvpn.py
# LOG = logging.getLogger(__name__)
# class Bgpvpn(neutron.NeutronAPIDictWrapper):
# class NetworkAssociation(neutron.NeutronAPIDictWrapper):
# class RouterAssociation(neutron.NeutronAPIDictWrapper):
# def bgpvpns_list(request, **kwargs):
# def bgpvpn_get(request, bgpvpn_id, **kwargs):
# def bgpvpn_create(request, **kwargs):
# def bgpvpn_update(request, bgpvpn_id, **kwargs):
# def bgpvpn_delete(request, bgpvpn_id):
# def network_association_get(request, bgpvpn_id, network_assoc_id, **kwargs):
# def network_association_list(request, bgpvpn_id, **kwargs):
# def network_association_create(request, bgpvpn_id, **kwargs):
# def network_association_delete(request, resource_id, bgpvpn_id):
# def router_association_get(request, bgpvpn_id, router_assoc_id, **kwargs):
# def router_association_list(request, bgpvpn_id, **kwargs):
# def router_association_create(request, bgpvpn_id, **kwargs):
# def router_association_update(request, bgpvpn_id, router_association_id,
#                               **kwargs):
# def router_association_delete(request, resource_id, bgpvpn_id):
# 
# Path: bgpvpn_dashboard/dashboards/admin/bgpvpn/tables.py
# LOG = logging.getLogger(__name__)
# class DeleteBgpvpn(policy.PolicyTargetMixin, tables.DeleteAction):
# class CreateBgpVpn(tables.LinkAction):
# class EditInfoBgpVpn(project_tables.EditInfoBgpVpn):
# class CreateNetworkAssociation(project_tables.CreateNetworkAssociation):
# class CreateRouterAssociation(project_tables.CreateRouterAssociation):
# class BgpvpnTable(project_tables.BgpvpnTable):
#     class Meta(object):
#     def action_present(count):
#     def action_past(count):
#     def delete(self, request, obj_id):
# def get_route_targets(bgpvpn):
# def get_import_targets(bgpvpn):
# def get_export_targets(bgpvpn):
# def get_network_url(network):
# def get_router_url(router):
# 
# Path: bgpvpn_dashboard/dashboards/admin/bgpvpn/views.py
# class IndexView(project_views.IndexView):
# class CreateView(forms.ModalFormView):
# class EditDataView(project_views.EditDataView):
# class CreateNetworkAssociationView(project_views.CreateNetworkAssociationView):
# class CreateRouterAssociationView(project_views.CreateRouterAssociationView):
# class DetailProjectView(project_views.DetailProjectView):
#     def _get_tenant_name(self, id):
#     def get_data(self):


from unittest import mock
from collections import namedtuple
from bgpvpn_dashboard.api import bgpvpn as bgpvpn_api
from bgpvpn_dashboard.dashboards.admin.bgpvpn import tables as bgpvpn_tables
from bgpvpn_dashboard.dashboards.admin.bgpvpn import views as bgpvpn_views
from openstack_dashboard.test import helpers
# Copyright (c) 2017 Orange.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.





VIEWS = "bgpvpn_dashboard.dashboards.admin.bgpvpn.views"


class TestIndexView(helpers.APITestCase):

    def setUp(self):
        super(TestIndexView, self).setUp()
        mock_request = mock.Mock(horizon={'async_messages': []})
        self.bgpvpn_view = bgpvpn_views.IndexView(request=mock_request)
        self.assertEqual(bgpvpn_tables.BgpvpnTable,
                         self.bgpvpn_view.table_class)


# Path: bgpvpn_dashboard/api/bgpvpn.py
# LOG = logging.getLogger(__name__)
# class Bgpvpn(neutron.NeutronAPIDictWrapper):
# class NetworkAssociation(neutron.NeutronAPIDictWrapper):
# class RouterAssociation(neutron.NeutronAPIDictWrapper):
# def bgpvpns_list(request, **kwargs):
# def bgpvpn_get(request, bgpvpn_id, **kwargs):
# def bgpvpn_create(request, **kwargs):
# def bgpvpn_update(request, bgpvpn_id, **kwargs):
# def bgpvpn_delete(request, bgpvpn_id):
# def network_association_get(request, bgpvpn_id, network_assoc_id, **kwargs):
# def network_association_list(request, bgpvpn_id, **kwargs):
# def network_association_create(request, bgpvpn_id, **kwargs):
# def network_association_delete(request, resource_id, bgpvpn_id):
# def router_association_get(request, bgpvpn_id, router_assoc_id, **kwargs):
# def router_association_list(request, bgpvpn_id, **kwargs):
# def router_association_create(request, bgpvpn_id, **kwargs):
# def router_association_update(request, bgpvpn_id, router_association_id,
#                               **kwargs):
# def router_association_delete(request, resource_id, bgpvpn_id):
# 
# Path: bgpvpn_dashboard/dashboards/admin/bgpvpn/tables.py
# LOG = logging.getLogger(__name__)
# class DeleteBgpvpn(policy.PolicyTargetMixin, tables.DeleteAction):
# class CreateBgpVpn(tables.LinkAction):
# class EditInfoBgpVpn(project_tables.EditInfoBgpVpn):
# class CreateNetworkAssociation(project_tables.CreateNetworkAssociation):
# class CreateRouterAssociation(project_tables.CreateRouterAssociation):
# class BgpvpnTable(project_tables.BgpvpnTable):
#     class Meta(object):
#     def action_present(count):
#     def action_past(count):
#     def delete(self, request, obj_id):
# def get_route_targets(bgpvpn):
# def get_import_targets(bgpvpn):
# def get_export_targets(bgpvpn):
# def get_network_url(network):
# def get_router_url(router):
# 
# Path: bgpvpn_dashboard/dashboards/admin/bgpvpn/views.py
# class IndexView(project_views.IndexView):
# class CreateView(forms.ModalFormView):
# class EditDataView(project_views.EditDataView):
# class CreateNetworkAssociationView(project_views.CreateNetworkAssociationView):
# class CreateRouterAssociationView(project_views.CreateRouterAssociationView):
# class DetailProjectView(project_views.DetailProjectView):
#     def _get_tenant_name(self, id):
#     def get_data(self):


# Path: bgpvpn_dashboard/test/admin/test_views.py
from unittest import mock
from collections import namedtuple
from bgpvpn_dashboard.api import bgpvpn as bgpvpn_api
from bgpvpn_dashboard.dashboards.admin.bgpvpn import tables as bgpvpn_tables
from bgpvpn_dashboard.dashboards.admin.bgpvpn import views as bgpvpn_views
from openstack_dashboard.test import helpers

# Copyright (c) 2017 Orange.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.





VIEWS = "bgpvpn_dashboard.dashboards.admin.bgpvpn.views"


class TestIndexView(helpers.APITestCase):

    def setUp(self):
        super(TestIndexView, self).setUp()
        mock_request = mock.Mock(horizon={'async_messages': []})
        self.bgpvpn_view = bgpvpn_views.IndexView(request=mock_request)
        self.assertEqual(bgpvpn_tables.BgpvpnTable,
                         self.bgpvpn_view.table_class)


    def _get_mock_bgpvpn(self, prefix):