[test] Fix language negotiation test
At least when executed alone (there seems to be a test isolation
problem which I could not figure out).
--- a/cubicweb/web/test/unittest_application.py Thu Nov 10 18:25:50 2016 +0100
+++ b/cubicweb/web/test/unittest_application.py Tue Nov 15 00:12:34 2016 +0100
@@ -248,8 +248,9 @@
"""Language negociated, normal case."""
self.config.global_set_option('language-mode', 'http-negotiation')
orig_translations = self.config.translations.copy()
- self.config.translations = {'fr': (text_type, text_type),
- 'en': (text_type, text_type)}
+ self.config.translations = {
+ 'fr': (text_type, lambda x, y: text_type(y)),
+ 'en': (text_type, lambda x, y: text_type(y))}
try:
headers = {'Accept-Language': 'fr'}
with self.admin_access.web_request(headers=headers) as req: