Tests passing on Py3

This commit is contained in:
Ask Solem 2014-05-21 13:25:18 +01:00
parent f80e0c349f
commit 49de25a175
1 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,6 @@
from __future__ import absolute_import
import sys
import warnings
from kombu import Connection
@ -10,6 +11,9 @@ from kombu.compression import compress
from kombu.tests.case import Case, Mock, patch, redirect_stdouts
PY3 = sys.version_info[0] == 3
PRINT_FQDN = 'builtins.print' if PY3 else '__builtin__.print'
def client(**kwargs):
return Connection(transport='kombu.transport.virtual:Transport', **kwargs)
@ -393,7 +397,7 @@ class test_Channel(Case):
self.assertFalse(q._delivered)
@patch('kombu.transport.virtual.emergency_dump_state')
@patch('__builtin__.print')
@patch(PRINT_FQDN)
def test_restore_unacked_once_when_unrestored(self, print_,
emergency_dump_state):
q = self.channel.qos