From e9f819d7de8eff686faa0abb8651b46a78f891cd Mon Sep 17 00:00:00 2001 From: David Lyle Date: Mon, 24 Aug 2015 11:28:53 -0600 Subject: [PATCH] Adding missing mocks to lbaas tests test_delete_vip is missing mocks, so it's hitting the API and timing out and dumping to the console. Adding mocks and removing noise from console log. Closes-Bug: #1488168 Change-Id: Ib428e43d34db270ca3ad635b2c9b724dbc75df7b --- .../dashboards/project/loadbalancers/tests.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openstack_dashboard/dashboards/project/loadbalancers/tests.py b/openstack_dashboard/dashboards/project/loadbalancers/tests.py index cd905ee5e0..4ccef9d056 100644 --- a/openstack_dashboard/dashboards/project/loadbalancers/tests.py +++ b/openstack_dashboard/dashboards/project/loadbalancers/tests.py @@ -907,7 +907,10 @@ class LoadBalancerTests(test.TestCase): self.assertNoFormErrors(res) @test.create_stubs({api.lbaas: ('pool_list', 'pool_get', - 'vip_delete')}) + 'vip_delete'), + api.network: ( + 'floating_ip_supported', + 'floating_ip_simple_associate_supported')}) def test_delete_vip(self): pool = self.pools.first() vip = self.vips.first() @@ -915,6 +918,10 @@ class LoadBalancerTests(test.TestCase): IsA(http.HttpRequest), tenant_id=self.tenant.id) \ .AndReturn(self.pools.list()) api.lbaas.pool_get(IsA(http.HttpRequest), pool.id).AndReturn(pool) + api.network.floating_ip_supported(IgnoreArg()).MultipleTimes() \ + .AndReturn(True) + api.network.floating_ip_simple_associate_supported(IgnoreArg()) \ + .MultipleTimes().AndReturn(True) api.lbaas.vip_delete(IsA(http.HttpRequest), vip.id) self.mox.ReplayAll()