~yolanda.robla/horizon/precise-security

« back to all changes in this revision

Viewing changes to horizon/horizon/dashboards/nova/access_and_security/floating_ips/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
#    License for the specific language governing permissions and limitations
20
20
#    under the License.
21
21
 
22
 
import datetime
23
 
 
24
22
from django import http
25
23
from django.core.urlresolvers import reverse
26
 
from django.shortcuts import redirect
27
 
from mox import IsA, IgnoreArg
 
24
from mox import IsA
28
25
from novaclient import exceptions as novaclient_exceptions
29
26
 
30
27
from horizon import api
31
28
from horizon import test
32
 
from horizon.dashboards.nova.access_and_security.floating_ips.forms import \
33
 
                                                            FloatingIpAssociate
34
29
 
35
30
 
36
31
INDEX_URL = reverse('horizon:nova:access_and_security:index')
82
77
                        'nova/access_and_security/floating_ips/associate.html')
83
78
 
84
79
    def test_associate_post(self):
85
 
        server = self.server
86
 
 
87
80
        self.mox.StubOutWithMock(api, 'server_list')
88
81
        api.server_list = self.mox.CreateMockAnything()
89
82
        api.server_list(IsA(http.HttpRequest)).AndReturn(self.servers)
114
107
        self.assertRedirects(res, INDEX_URL)
115
108
 
116
109
    def test_associate_post_with_exception(self):
117
 
        server = self.server
118
 
 
119
110
        self.mox.StubOutWithMock(api, 'server_list')
120
111
        api.server_list = self.mox.CreateMockAnything()
121
112
        api.server_list(IsA(http.HttpRequest)).AndReturn(self.servers)