Package: horizon / 2014.1.3-7+deb8u2

0009_Fix-TypeError-SecurityGroup-object-is-not-iterable-t.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Description: TypeError: 'SecurityGroup' object is not iterable test failure with Django 1.7
 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.
From: Raphael Hertzog <hertzog@debian.org>
Forwarded: https://review.openstack.org/111934
Date: Mon, 4 Aug 2014 22:48:43 +0200

diff --git a/openstack_dashboard/dashboards/project/instances/tests.py b/openstack_dashboard/dashboards/project/instances/tests.py
index e3e7f23..bb2cfc4 100644
--- a/openstack_dashboard/dashboards/project/instances/tests.py
+++ b/openstack_dashboard/dashboards/project/instances/tests.py
@@ -627,7 +627,7 @@ class InstanceTests(test.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()
 
@@ -654,7 +654,7 @@ class InstanceTests(test.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()
 
-- 
2.0.1