summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-03-31 14:59:49 +0000
committerGerrit Code Review <review@openstack.org>2014-03-31 14:59:49 +0000
commit23aea6a5fb55d44fc838efb7a5033c66dba60cab (patch)
tree265d313071204ceb10c904ecf58fd0037b284f9f
parenta6a169d8098f4bcdfbb371fba66b1751ad1922e0 (diff)
parent8516945bb44084d0dbbe2b74e90d0aa636c700ae (diff)
Merge "Added network's api mocking for the servers_update_addresses method"2014.1.rc1
-rw-r--r--openstack_dashboard/dashboards/project/instances/tests.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/openstack_dashboard/dashboards/project/instances/tests.py b/openstack_dashboard/dashboards/project/instances/tests.py
index 112670d..e3e7f23 100644
--- a/openstack_dashboard/dashboards/project/instances/tests.py
+++ b/openstack_dashboard/dashboards/project/instances/tests.py
@@ -2668,7 +2668,8 @@ class InstanceTests(test.TestCase):
2668 'extension_supported',), 2668 'extension_supported',),
2669 api.glance: ('image_list_detailed',), 2669 api.glance: ('image_list_detailed',),
2670 api.network: 2670 api.network:
2671 ('floating_ip_simple_associate_supported',), 2671 ('floating_ip_simple_associate_supported',
2672 'servers_update_addresses',),
2672 }) 2673 })
2673 def test_index_form_action_with_pagination(self): 2674 def test_index_form_action_with_pagination(self):
2674 """The form action on the next page should have marker 2675 """The form action on the next page should have marker
@@ -2688,9 +2689,13 @@ class InstanceTests(test.TestCase):
2688 search_opts = {'marker': None, 'paginate': True} 2689 search_opts = {'marker': None, 'paginate': True}
2689 api.nova.server_list(IsA(http.HttpRequest), search_opts=search_opts) \ 2690 api.nova.server_list(IsA(http.HttpRequest), search_opts=search_opts) \
2690 .AndReturn([servers[:page_size], True]) 2691 .AndReturn([servers[:page_size], True])
2692 api.network.servers_update_addresses(
2693 IsA(http.HttpRequest), servers[:page_size])
2691 api.nova.server_list(IsA(http.HttpRequest), search_opts={ 2694 api.nova.server_list(IsA(http.HttpRequest), search_opts={
2692 'marker': servers[page_size - 1].id, 'paginate': True}) \ 2695 'marker': servers[page_size - 1].id, 'paginate': True}) \
2693 .AndReturn([servers[page_size:], False]) 2696 .AndReturn([servers[page_size:], False])
2697 api.network.servers_update_addresses(
2698 IsA(http.HttpRequest), servers[page_size:])
2694 2699
2695 api.nova.tenant_absolute_limits(IsA(http.HttpRequest), reserved=True) \ 2700 api.nova.tenant_absolute_limits(IsA(http.HttpRequest), reserved=True) \
2696 .MultipleTimes().AndReturn(self.limits['absolute']) 2701 .MultipleTimes().AndReturn(self.limits['absolute'])