[fedmsg] Apply patch to get tests passing in koji again.

Ralph Bean ralph at fedoraproject.org
Fri Nov 7 16:03:15 UTC 2014


commit 2544400069c613126be09d4593fa426a07fda9f9
Author: Ralph Bean <rbean at redhat.com>
Date:   Fri Nov 7 11:01:38 2014 -0500

    Apply patch to get tests passing in koji again.

 fedmsg-kojitests.patch |   58 ++++++++++++++++++++++++++++++++++++++++++++++++
 fedmsg.spec            |    4 +++
 2 files changed, 62 insertions(+), 0 deletions(-)
---
diff --git a/fedmsg-kojitests.patch b/fedmsg-kojitests.patch
new file mode 100644
index 0000000..12f1970
--- /dev/null
+++ b/fedmsg-kojitests.patch
@@ -0,0 +1,58 @@
+From 261bf1fcb2ae393e3ef96805e7d7b2f93884f90d Mon Sep 17 00:00:00 2001
+From: Ralph Bean <rbean at redhat.com>
+Date: Fri, 7 Nov 2014 10:58:24 -0500
+Subject: [PATCH] Try to get tests passing in koji again.
+
+---
+ fedmsg/tests/test_crypto_switching.py | 6 ++++--
+ fedmsg/tests/test_crypto_x509.py      | 6 ++++--
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/fedmsg/tests/test_crypto_switching.py b/fedmsg/tests/test_crypto_switching.py
+index 64feca2..5644856 100644
+--- a/fedmsg/tests/test_crypto_switching.py
++++ b/fedmsg/tests/test_crypto_switching.py
+@@ -18,14 +18,16 @@
+ # Authors:  Ralph Bean <rbean at redhat.com>
+ #
+ import six
++import sys
+ import os
+ 
+ import nose.tools.nontrivial
+ 
+-try:
++major, minor = sys.version_info[:2]
++if major == 2 and minor <= 6:
+     # For python-2.6, so we can do skipTest
+     import unittest2 as unittest
+-except ImportError:
++else:
+     import unittest
+ 
+ import fedmsg.crypto
+diff --git a/fedmsg/tests/test_crypto_x509.py b/fedmsg/tests/test_crypto_x509.py
+index 06bde10..efea61a 100644
+--- a/fedmsg/tests/test_crypto_x509.py
++++ b/fedmsg/tests/test_crypto_x509.py
+@@ -20,13 +20,15 @@
+ import os
+ import shutil
+ import six
++import sys
+ 
+ import nose.tools.nontrivial
+ 
+-try:
++major, minor = sys.version_info[:2]
++if major == 2 and minor <= 6:
+     # For python-2.6, so we can do skipTest
+     import unittest2 as unittest
+-except ImportError:
++else:
+     import unittest
+ 
+ import fedmsg.crypto
+-- 
+1.9.3
+
diff --git a/fedmsg.spec b/fedmsg.spec
index 1c8cb5d..e6cadc9 100644
--- a/fedmsg.spec
+++ b/fedmsg.spec
@@ -12,6 +12,7 @@ License:        LGPLv2+
 URL:            http://github.com/ralphbean/fedmsg
 Source0:        http://pypi.python.org/packages/source/f/%{modname}/%{modname}-%{version}.tar.gz
 Source1:        %{name}-tmpfiles.conf
+Patch0:         fedmsg-kojitests.patch
 
 BuildArch:      noarch
 
@@ -126,6 +127,8 @@ socket.  Useful for repeating messages outside a firewall.
 %prep
 %setup -q -n %{modname}-%{version}
 
+%patch0 -p1
+
 # This only got shipped with fedmsg-0.6.3
 rm -f fedmsg.d/_tweet-real.py
 
@@ -306,6 +309,7 @@ fi
 - Systemd services now restart on failure.
 - Items in the conglomerators are now de-duplicated (bodhi).
 - You can now call .tail_messages() while configured for active mode (koschei).
+- Apply patch to try and get tests passing in koji again.
 
 * Thu Oct 30 2014 Luke Macken <lmacken at redhat.com> - 0.11.0-3
 - Add a tmpfiles.d configuration for /var/run/fedmsg


More information about the scm-commits mailing list