diff options
Diffstat (limited to 'openstack_dashboard/test/helpers.py')
-rw-r--r-- | openstack_dashboard/test/helpers.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/openstack_dashboard/test/helpers.py b/openstack_dashboard/test/helpers.py index 1b8fe87..8970c3a 100644 --- a/openstack_dashboard/test/helpers.py +++ b/openstack_dashboard/test/helpers.py | |||
@@ -37,7 +37,6 @@ from django.utils import http | |||
37 | 37 | ||
38 | from cinderclient import client as cinder_client | 38 | from cinderclient import client as cinder_client |
39 | import glanceclient | 39 | import glanceclient |
40 | from heatclient import client as heat_client | ||
41 | from keystoneclient.v2_0 import client as keystone_client | 40 | from keystoneclient.v2_0 import client as keystone_client |
42 | import mock | 41 | import mock |
43 | from mox3 import mox | 42 | from mox3 import mox |
@@ -433,7 +432,6 @@ class APITestCase(TestCase): | |||
433 | self._original_novaclient = api.nova.novaclient | 432 | self._original_novaclient = api.nova.novaclient |
434 | self._original_neutronclient = api.neutron.neutronclient | 433 | self._original_neutronclient = api.neutron.neutronclient |
435 | self._original_cinderclient = api.cinder.cinderclient | 434 | self._original_cinderclient = api.cinder.cinderclient |
436 | self._original_heatclient = api.heat.heatclient | ||
437 | 435 | ||
438 | # Replace the clients with our stubs. | 436 | # Replace the clients with our stubs. |
439 | api.glance.glanceclient = fake_glanceclient | 437 | api.glance.glanceclient = fake_glanceclient |
@@ -441,8 +439,6 @@ class APITestCase(TestCase): | |||
441 | api.nova.novaclient = fake_novaclient | 439 | api.nova.novaclient = fake_novaclient |
442 | api.neutron.neutronclient = lambda request: self.stub_neutronclient() | 440 | api.neutron.neutronclient = lambda request: self.stub_neutronclient() |
443 | api.cinder.cinderclient = lambda request: self.stub_cinderclient() | 441 | api.cinder.cinderclient = lambda request: self.stub_cinderclient() |
444 | api.heat.heatclient = (lambda request, password=None: | ||
445 | self.stub_heatclient()) | ||
446 | 442 | ||
447 | def tearDown(self): | 443 | def tearDown(self): |
448 | super(APITestCase, self).tearDown() | 444 | super(APITestCase, self).tearDown() |
@@ -451,7 +447,6 @@ class APITestCase(TestCase): | |||
451 | api.keystone.keystoneclient = self._original_keystoneclient | 447 | api.keystone.keystoneclient = self._original_keystoneclient |
452 | api.neutron.neutronclient = self._original_neutronclient | 448 | api.neutron.neutronclient = self._original_neutronclient |
453 | api.cinder.cinderclient = self._original_cinderclient | 449 | api.cinder.cinderclient = self._original_cinderclient |
454 | api.heat.heatclient = self._original_heatclient | ||
455 | 450 | ||
456 | def stub_novaclient(self): | 451 | def stub_novaclient(self): |
457 | if not hasattr(self, "novaclient"): | 452 | if not hasattr(self, "novaclient"): |
@@ -518,12 +513,6 @@ class APITestCase(TestCase): | |||
518 | expected_calls -= 1 | 513 | expected_calls -= 1 |
519 | return self.swiftclient | 514 | return self.swiftclient |
520 | 515 | ||
521 | def stub_heatclient(self): | ||
522 | if not hasattr(self, "heatclient"): | ||
523 | self.mox.StubOutWithMock(heat_client, 'Client') | ||
524 | self.heatclient = self.mox.CreateMock(heat_client.Client) | ||
525 | return self.heatclient | ||
526 | |||
527 | 516 | ||
528 | class APIMockTestCase(APITestCase): | 517 | class APIMockTestCase(APITestCase): |
529 | def stub_cinderclient(self): | 518 | def stub_cinderclient(self): |