Browse Source

2to3 updates

Ask Solem 11 years ago
parent
commit
3dcbde5f73
2 changed files with 4 additions and 3 deletions
  1. 3 2
      celery/tests/app/test_amqp.py
  2. 1 1
      celery/tests/utils/test_datastructures.py

+ 3 - 2
celery/tests/app/test_amqp.py

@@ -4,6 +4,7 @@ from kombu import Exchange, Queue
 from mock import Mock
 
 from celery.app.amqp import Queues, TaskPublisher
+from celery.five import keys
 from celery.tests.case import AppCase
 
 
@@ -185,13 +186,13 @@ class test_Queues(AppCase):
         q = Queues()
         q.select_subset(['foo', 'bar'])
         q.select_add('baz')
-        self.assertItemsEqual(q._consume_from.keys(), ['foo', 'bar', 'baz'])
+        self.assertItemsEqual(keys(q._consume_from), ['foo', 'bar', 'baz'])
 
     def test_select_remove(self):
         q = Queues()
         q.select_subset(['foo', 'bar'])
         q.select_remove('bar')
-        self.assertItemsEqual(q._consume_from.keys(), ['foo'])
+        self.assertItemsEqual(keys(q._consume_from), ['foo'])
 
     def test_with_ha_policy_compat(self):
         q = Queues(ha_policy='all')

+ 1 - 1
celery/tests/utils/test_datastructures.py

@@ -40,7 +40,7 @@ class test_DictAttribute(Case):
             list(x.items()),
         )
         self.assertIn('foo', list(x.keys()))
-        self.assertIn('The quick yellow fox', x.values())
+        self.assertIn('The quick yellow fox', list(x.values()))
 
     def test_setdefault(self):
         x = DictAttribute(Object())