|
@@ -1,6 +1,7 @@
|
|
|
# -*- coding: utf-8 -*-
|
|
|
from __future__ import absolute_import
|
|
|
|
|
|
+from kombu.utils import encoding
|
|
|
from kombu.utils.encoding import str_t
|
|
|
|
|
|
from celery.utils import term
|
|
@@ -11,6 +12,16 @@ from celery.tests.utils import Case
|
|
|
|
|
|
class test_colored(Case):
|
|
|
|
|
|
+ def setUp(self):
|
|
|
+ self._prev_encoding = encoding.default_encoding
|
|
|
+
|
|
|
+ def getdefaultencoding():
|
|
|
+ return 'utf-8'
|
|
|
+ encoding.default_encoding = getdefaultencoding
|
|
|
+
|
|
|
+ def tearDown(self):
|
|
|
+ encoding.default_encoding = self._prev_encoding
|
|
|
+
|
|
|
def test_colors(self):
|
|
|
colors = (
|
|
|
('black', term.BLACK),
|