# Path: bgpvpn_dashboard/test/helpers.py
# class TestCase(helpers.TestCase):
# class APITestCase(helpers.APITestCase):
#     def _setup_test_data(self):
#     def _setup_test_data(self):


from unittest import mock
from openstack_dashboard.test import helpers as test
from bgpvpn_dashboard import api
from bgpvpn_dashboard.test import helpers as bgpvpn_test
from neutronclient.v2_0.client import Client as neutronclient

        self.mock_update_bgpvpn.return_value = ret_dict

        ret_val = api.bgpvpn.bgpvpn_update(self.request, bgpvpn.id, **data)
        self.assertIsInstance(ret_val, api.bgpvpn.Bgpvpn)
        self.assertEqual('new name', ret_val.name)
        self.assertEqual(['65001:2'], ret_val.route_targets)

    @test.create_mocks({neutronclient: ('delete_bgpvpn',)})
    def test_bgpvpn_delete(self):
        bgpvpn = self.bgpvpns.first()
        api.bgpvpn.bgpvpn_delete(self.request, bgpvpn.id)

        self.mock_delete_bgpvpn.assert_called_once_with(bgpvpn.id)

    @test.create_mocks({
        neutronclient: ('show_bgpvpn_network_assoc',)})
    def test_network_association_get(self):
        bgpvpn = self.bgpvpns.first()
        na = self.network_associations.first()
        ret_dict = {
            'network_association': self.api_network_associations.first()}

        self.mock_show_bgpvpn_network_assoc.return_value = ret_dict

        ret_val = api.bgpvpn.network_association_get(
            self.request, bgpvpn.id, na.id)
        self.assertIsInstance(ret_val, api.bgpvpn.NetworkAssociation)

    @test.create_mocks({

# Path: bgpvpn_dashboard/test/helpers.py
# class TestCase(helpers.TestCase):
# class APITestCase(helpers.APITestCase):
#     def _setup_test_data(self):
#     def _setup_test_data(self):


# Path: bgpvpn_dashboard/test/api_tests/test_bgpvpn.py
from unittest import mock
from openstack_dashboard.test import helpers as test
from bgpvpn_dashboard import api
from bgpvpn_dashboard.test import helpers as bgpvpn_test
from neutronclient.v2_0.client import Client as neutronclient


        self.mock_update_bgpvpn.return_value = ret_dict

        ret_val = api.bgpvpn.bgpvpn_update(self.request, bgpvpn.id, **data)
        self.assertIsInstance(ret_val, api.bgpvpn.Bgpvpn)
        self.assertEqual('new name', ret_val.name)
        self.assertEqual(['65001:2'], ret_val.route_targets)

    @test.create_mocks({neutronclient: ('delete_bgpvpn',)})
    def test_bgpvpn_delete(self):
        bgpvpn = self.bgpvpns.first()
        api.bgpvpn.bgpvpn_delete(self.request, bgpvpn.id)

        self.mock_delete_bgpvpn.assert_called_once_with(bgpvpn.id)

    @test.create_mocks({
        neutronclient: ('show_bgpvpn_network_assoc',)})
    def test_network_association_get(self):
        bgpvpn = self.bgpvpns.first()
        na = self.network_associations.first()
        ret_dict = {
            'network_association': self.api_network_associations.first()}

        self.mock_show_bgpvpn_network_assoc.return_value = ret_dict

        ret_val = api.bgpvpn.network_association_get(
            self.request, bgpvpn.id, na.id)
        self.assertIsInstance(ret_val, api.bgpvpn.NetworkAssociation)

    @test.create_mocks({

        neutronclient: ('list_bgpvpn_network_assocs',)})