

def test_networkclient_neutron(self):
    self.mox.StubOutWithMock(api.base, 'is_service_enabled')
    api.base.is_service_enabled(IsA(http.HttpRequest), 'network').AndReturn(True)
    self.neutronclient = self.stub_neutronclient()
    self.neutronclient.list_extensions().AndReturn({
        'extensions': self.api_extensions.list(),
    })
    self.mox.ReplayAll()
    nc = api.network.NetworkClient(self.request)
    self.assertIsInstance(nc.floating_ips, api.neutron.FloatingIpManager)
    self.assertIsInstance(nc.secgroups, api.neutron.SecurityGroupManager)

dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/test/api_tests/network_tests.py NetworkClientTestCase.test_networkclient_neutron/original