From c1b9c0356335ba509e0247f1c35da91976dfcb52 Mon Sep 17 00:00:00 2001
From: Thomas Goirand <thomas@goirand.fr>
Date: Sun, 21 Sep 2014 07:59:52 +0000
Subject: [PATCH] Added
 debian/patches/0009_Fix-TypeError-SecurityGroup-object-is-not-iterable-t.patch

Rewritten-From: 5cf592cc7ab87a46a15a256ecb4d2ed51559edc1
---
 xenial/debian/changelog                       |  1 +
 ...curityGroup-object-is-not-iterable-t.patch | 33 +++++++++++++++++++
 xenial/debian/patches/series                  |  1 +
 3 files changed, 35 insertions(+)
 create mode 100644 xenial/debian/patches/0009_Fix-TypeError-SecurityGroup-object-is-not-iterable-t.patch

diff --git a/xenial/debian/changelog b/xenial/debian/changelog
index 666bcc4..a90a0df 100644
--- a/xenial/debian/changelog
+++ b/xenial/debian/changelog
@@ -4,6 +4,7 @@ horizon (2014.2~b3-1) experimental; urgency=medium
   * Fixed (build-)depends for this release.
   * Removed fix-python-m-coverage.patch FINALLY applied upstream !!! :)
   * Added 0008_Handle_TypeError_from_table_column_summation_code.patch.
+  * Added 0009_Fix-TypeError-SecurityGroup-object-is-not-iterable-t.patch
 
  -- Thomas Goirand <zigo@debian.org>  Tue, 01 Jul 2014 16:06:08 +0800
 
diff --git a/xenial/debian/patches/0009_Fix-TypeError-SecurityGroup-object-is-not-iterable-t.patch b/xenial/debian/patches/0009_Fix-TypeError-SecurityGroup-object-is-not-iterable-t.patch
new file mode 100644
index 0000000..6aed8d5
--- /dev/null
+++ b/xenial/debian/patches/0009_Fix-TypeError-SecurityGroup-object-is-not-iterable-t.patch
@@ -0,0 +1,33 @@
+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
+
+--- horizon-2014.2~b3.orig/openstack_dashboard/dashboards/project/instances/tests.py
++++ horizon-2014.2~b3/openstack_dashboard/dashboards/project/instances/tests.py
+@@ -686,7 +686,7 @@ class InstanceTests(helpers.TestCase):
+     def test_instance_details_volumes(self):
+         server = self.servers.first()
+         volumes = [self.volumes.list()[1]]
+-        security_group = self.security_groups.first()
++        security_group = self.security_groups.list()
+ 
+         res = self._get_instance_details(server, volumes_return=volumes,
+                                          security_groups_return=security_group)
+@@ -698,7 +698,7 @@ class InstanceTests(helpers.TestCase):
+     def test_instance_details_volume_sorting(self):
+         server = self.servers.first()
+         volumes = self.volumes.list()[1:3]
+-        security_group = self.security_groups.first()
++        security_group = self.security_groups.list()
+ 
+         res = self._get_instance_details(server, volumes_return=volumes,
+                                          security_groups_return=security_group)
diff --git a/xenial/debian/patches/series b/xenial/debian/patches/series
index e88e18f..0aa3592 100644
--- a/xenial/debian/patches/series
+++ b/xenial/debian/patches/series
@@ -2,3 +2,4 @@ fix-dashboard-django-wsgi.patch
 fix-dashboard-manage.patch
 fixed-horizon-MANIFEST.in.patch
 0008_Handle_TypeError_from_table_column_summation_code.patch
+0009_Fix-TypeError-SecurityGroup-object-is-not-iterable-t.patch
-- 
2.45.2