summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Zeidler <az@zitc.de>2013-08-17 12:21:50 +0200
committerAndreas Zeidler <az@zitc.de>2013-08-17 12:26:15 +0200
commit0064eb70d5b30507b65c05271fe12a2697f88d05 (patch)
tree0ea6b6780db6f9daba3c492fc7181e8f341079f2
parent186c2b8b9f2c259ccb264982b2433081ca26e3bf (diff)
downloadpyramid-0064eb70d5b30507b65c05271fe12a2697f88d05.tar.gz
pyramid-0064eb70d5b30507b65c05271fe12a2697f88d05.tar.bz2
pyramid-0064eb70d5b30507b65c05271fe12a2697f88d05.zip
don't use the default locale when testing custom localizer
also, use an object as a dummy localizer for better readability
-rw-r--r--pyramid/tests/test_i18n.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pyramid/tests/test_i18n.py b/pyramid/tests/test_i18n.py
index 58af96493..b583d1468 100644
--- a/pyramid/tests/test_i18n.py
+++ b/pyramid/tests/test_i18n.py
@@ -252,12 +252,12 @@ class Test_get_localizer(unittest.TestCase):
from pyramid.threadlocal import get_current_registry
from pyramid.interfaces import ILocalizer
registry = get_current_registry()
- locale = 'abc'
- registry.registerUtility(locale, ILocalizer, name='en')
+ dummy = object()
+ registry.registerUtility(dummy, ILocalizer, name='ie')
request = DummyRequest()
- request.locale_name = 'en'
+ request.locale_name = 'ie'
result = self._callFUT(request)
- self.assertEqual(result, 'abc')
+ self.assertEqual(result, dummy)
def test_locale_from_mo(self):
from pyramid.threadlocal import get_current_registry