[Python-modules-commits] r26707 - in packages/fedmsg/branches/wheezy-backports/debian (3 files)

olasd at users.alioth.debian.org olasd at users.alioth.debian.org
Sun Dec 8 14:24:43 UTC 2013


    Date: Sunday, December 8, 2013 @ 14:24:42
  Author: olasd
Revision: 26707

Add patch to make tests pass with the nose and mock versions in wheezy

Added:
  packages/fedmsg/branches/wheezy-backports/debian/patches/fix_tests_for_wheezy.diff
Modified:
  packages/fedmsg/branches/wheezy-backports/debian/changelog
  packages/fedmsg/branches/wheezy-backports/debian/patches/series

Modified: packages/fedmsg/branches/wheezy-backports/debian/changelog
===================================================================
--- packages/fedmsg/branches/wheezy-backports/debian/changelog	2013-12-08 14:23:46 UTC (rev 26706)
+++ packages/fedmsg/branches/wheezy-backports/debian/changelog	2013-12-08 14:24:42 UTC (rev 26707)
@@ -3,6 +3,8 @@
   * Rebuild for wheezy-backports.
   * Bump versioned dependency on python-zmq to get the (backported)
     zeromq3 version
+  * Add patch fix_tests_for_wheezy.diff: make tests pass with nose and
+    mock from wheezy
 
  -- Nicolas Dandrimont <olasd at debian.org>  Sun, 08 Dec 2013 13:53:55 +0100
 

Added: packages/fedmsg/branches/wheezy-backports/debian/patches/fix_tests_for_wheezy.diff
===================================================================
--- packages/fedmsg/branches/wheezy-backports/debian/patches/fix_tests_for_wheezy.diff	                        (rev 0)
+++ packages/fedmsg/branches/wheezy-backports/debian/patches/fix_tests_for_wheezy.diff	2013-12-08 14:24:42 UTC (rev 26707)
@@ -0,0 +1,66 @@
+Description: Fix tests for wheezy-backports
+Author: Nicolas Dandrimont <olasd at debian.org>
+
+---
+Forwarded: not-needed
+
+Index: fedmsg-0.7.1/fedmsg/tests/test_meta.py
+===================================================================
+--- fedmsg-0.7.1.orig/fedmsg/tests/test_meta.py	2013-09-05 14:12:26.000000000 +0000
++++ fedmsg-0.7.1/fedmsg/tests/test_meta.py	2013-12-08 13:24:58.715928955 +0000
+@@ -23,8 +23,7 @@
+ import unittest
+ 
+ from nose import SkipTest
+-from nose.tools import eq_
+-from nose.tools.nontrivial import make_decorator
++from nose.tools import eq_, make_decorator
+ 
+ import fedmsg.meta
+ 
+Index: fedmsg-0.7.1/fedmsg/tests/test_crypto_gpg.py
+===================================================================
+--- fedmsg-0.7.1.orig/fedmsg/tests/test_crypto_gpg.py	2013-09-05 14:12:26.000000000 +0000
++++ fedmsg-0.7.1/fedmsg/tests/test_crypto_gpg.py	2013-12-08 13:24:58.715928955 +0000
+@@ -20,9 +20,8 @@
+ import os
+ import functools
+ 
+-from nose.tools import raises
++from nose.tools import raises, make_decorator
+ from nose.exc import SkipTest
+-import nose.tools.nontrivial
+ import unittest
+ 
+ import fedmsg.crypto.gpg
+@@ -43,7 +42,7 @@
+         if os.environ.get('TRAVIS', None):
+             raise SkipTest("gpg permissions are weird on travis-ci.org")
+         return fn(self, *args, **kw)
+-    return nose.tools.nontrivial.make_decorator(fn)(newfunc)
++    return make_decorator(fn)(newfunc)
+ 
+ 
+ class TestGpg(unittest.TestCase):
+Index: fedmsg-0.7.1/fedmsg/tests/test_replay.py
+===================================================================
+--- fedmsg-0.7.1.orig/fedmsg/tests/test_replay.py	2013-09-05 19:06:07.000000000 +0000
++++ fedmsg-0.7.1/fedmsg/tests/test_replay.py	2013-12-08 13:57:30.133753104 +0000
+@@ -114,7 +114,7 @@
+     def test_get_error(self):
+         # Setup the store to return what we ask.
+         answer = ValueError('No luck!')
+-        self.config['persistent_store'].get = Mock(side_effect=[answer])
++        self.config['persistent_store'].get = Mock(side_effect=answer)
+         # Doesn't matter what we send as long as it is legit JSON,
+         # since the store is mocked
+         self.request_socket.send('{"id": 1}')
+@@ -236,7 +236,7 @@
+         # We don't actually test with a wrong query, we just throw back an
+         # error from the store.
+         self.config['persistent_store'].get = Mock(
+-            side_effect=[ValueError("this is an error")])
++            side_effect=ValueError("this is an error"))
+         self.replay_thread.start()
+         msgs = list(get_replay(
+             local_name, {"seq_ids": [1, 2]}, self.config, self.context

Modified: packages/fedmsg/branches/wheezy-backports/debian/patches/series
===================================================================
--- packages/fedmsg/branches/wheezy-backports/debian/patches/series	2013-12-08 14:23:46 UTC (rev 26706)
+++ packages/fedmsg/branches/wheezy-backports/debian/patches/series	2013-12-08 14:24:42 UTC (rev 26707)
@@ -3,3 +3,4 @@
 no-tweet
 remove_reference_to_google_web_fonts.diff
 fix_test_paths
+fix_tests_for_wheezy.diff




More information about the Python-modules-commits mailing list