# HG changeset patch # User Florent Cayré # Date 1479165154 -3600 # Node ID a06cf11f7d8718f6022ea869aeeaba06eae04414 # Parent 851b6bd79b50063e864b97d46b5fc0d3d5677d62 [test] Fix language negotiation test At least when executed alone (there seems to be a test isolation problem which I could not figure out). diff -r 851b6bd79b50 -r a06cf11f7d87 cubicweb/web/test/unittest_application.py --- 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: