Tue, 30 Jun 2015 15:06:36 +0200 [test] Fix unittest_i18n to run properly with "pytest -t" (closes #5576169)
Rémi Cardona <remi.cardona@logilab.fr> [Tue, 30 Jun 2015 15:06:36 +0200] rev 10464
[test] Fix unittest_i18n to run properly with "pytest -t" (closes #5576169) When running "pytest -t", many tests modules will be imported and run within a single python process. unittest_i18n fails when run after tests such as unittest_webtest.py or unittest_httptest.py. The main reason is that unittest_i18n does various tricks to add a test cube to the search path, which badly fails when a previous test module has already loaded "stuff" (for lack of a better word). Instead, let's just call the 'i18ncube' command with subprocess. The change from logilab.common.testlib to unittest is not directly needed, but comes as a free cleanup with the above changes.
Mon, 29 Jun 2015 16:58:43 +0200 [server/test] fix random error in unittest_security
Julien Cristau <julien.cristau@logilab.fr> [Mon, 29 Jun 2015 16:58:43 +0200] rev 10463
[server/test] fix random error in unittest_security When entering a new Connection, we cache the user and its 'login' attribute (with no permissions checking). This test makes 'CWUser.login' unreadable by guests, and then proceeds to make sure the 'anon' user can actually not read any 'login' attribute. However, due to the above cnx initialization, anon's login is actually cached, hence readable. This happens to make the test fail sometimes depending on the order in which CWUser entities are returned, because one of them has .complete() called, which as a side effect sets the attribute cache to None for unreadable attributes. Call .complete() on both entities to reset the login cache. While this is still highly debatable, at least it's consistent.
Mon, 29 Jun 2015 16:41:36 +0200 [entity] fix typo in comment
Julien Cristau <julien.cristau@logilab.fr> [Mon, 29 Jun 2015 16:41:36 +0200] rev 10462
[entity] fix typo in comment
(0) -10000 -3000 -1000 -300 -100 -30 -10 -3 +3 +10 +30 +100 +300 +1000 tip