From 30796ba9e21e1656b8bbe9fb30a2e4a0415260f0 Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Tue, 5 Aug 2014 14:57:19 +0800 Subject: [PATCH] Redefine instance.security_groups as list The two tests modified here were incorrectly defining instance.security_groups as a single value instead of a list. Apparently Django 1.7 is no longer happy trying to iterate something that is not an iterable. The other test_instance_details_*() were already doing the correct thing so just copy over the logic. Change-Id: I3ea2525927f9adbc1f000a03b5aedfbcb2595c02 --- openstack_dashboard/dashboards/project/instances/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openstack_dashboard/dashboards/project/instances/tests.py b/openstack_dashboard/dashboards/project/instances/tests.py index 68c0ef8166..f62e2214c0 100644 --- a/openstack_dashboard/dashboards/project/instances/tests.py +++ b/openstack_dashboard/dashboards/project/instances/tests.py @@ -623,7 +623,7 @@ class InstanceTests(helpers.TestCase): api.nova.flavor_get(IsA(http.HttpRequest), server.flavor['id']) \ .AndReturn(self.flavors.first()) api.network.server_security_groups(IsA(http.HttpRequest), server.id) \ - .AndReturn(self.security_groups.first()) + .AndReturn(self.security_groups.list()) self.mox.ReplayAll() @@ -650,7 +650,7 @@ class InstanceTests(helpers.TestCase): api.nova.flavor_get(IsA(http.HttpRequest), server.flavor['id']) \ .AndReturn(self.flavors.first()) api.network.server_security_groups(IsA(http.HttpRequest), server.id) \ - .AndReturn(self.security_groups.first()) + .AndReturn(self.security_groups.list()) self.mox.ReplayAll()