~yolanda.robla/horizon/precise-security

« back to all changes in this revision

Viewing changes to horizon/horizon/dashboards/nova/images_and_snapshots/snapshots/tests.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-02-03 09:55:54 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120203095554-sucnl95v2fjke6r1
Tags: 2012.1~e4~20120202.1300-0ubuntu1
* New upstream version.
* debian/control: Drop dependencies we dont need. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#    under the License.
20
20
 
21
21
from django import http
22
 
from django.contrib import messages
23
22
from django.core.urlresolvers import reverse
24
 
from glance.common import exception as glance_exception
25
 
from openstackx.api import exceptions as api_exceptions
26
 
from mox import IgnoreArg, IsA
 
23
from novaclient import exceptions as novaclient_exceptions
 
24
from mox import IsA
27
25
 
28
26
from horizon import api
29
27
from horizon import test
98
96
 
99
97
    def test_create_get_server_exception(self):
100
98
        self.mox.StubOutWithMock(api, 'server_get')
101
 
        exception = api_exceptions.ApiException('apiException')
 
99
        exception = novaclient_exceptions.ClientException('apiException')
102
100
        api.server_get(IsA(http.HttpRequest),
103
101
                       str(self.good_server.id)).AndRaise(exception)
104
102
 
158
156
 
159
157
        api.server_get(IsA(http.HttpRequest),
160
158
                       str(self.good_server.id)).AndReturn(self.good_server)
161
 
        exception = api_exceptions.ApiException('apiException',
 
159
        exception = novaclient_exceptions.ClientException('apiException',
162
160
                                                message='apiException')
163
161
        api.snapshot_create(IsA(http.HttpRequest),
164
162
                            str(self.good_server.id), SNAPSHOT_NAME).\