--- a/cubicweb/test/unittest_repoapi.py Thu Nov 17 10:47:52 2016 +0100
+++ b/cubicweb/test/unittest_repoapi.py Thu Nov 17 10:53:04 2016 +0100
@@ -83,6 +83,13 @@
rset = cnx.execute('Any X WHERE X is CWUser')
self.assertTrue(rset)
+ def test_cnx_has_lang(self):
+ """check that client and repo cnx have .lang set"""
+ with self.admin_access.client_cnx() as cnx:
+ self.assertEqual(cnx.lang, 'en')
+ with self.admin_access.repo_cnx() as cnx:
+ self.assertEqual(cnx.lang, 'en')
+
if __name__ == '__main__':
from logilab.common.testlib import unittest_main