[devtools] use a specific test_db_id when disabling anon
authorJulien Cristau <julien.cristau@logilab.fr>
Thu, 25 Sep 2014 10:50:23 +0200
changeset 10032 fd1dafb0ab10
parent 10031 bea3f6595fb4
child 10033 b3a1d15965d9
[devtools] use a specific test_db_id when disabling anon The anonymous user is created (or not) in postcreate, which for tests means when creating the cached empty database. The anonymous_allowed=False test classes should thus not share their template db with other test classes, otherwise either they end up with an unexpected anonymous user, or the others miss theirs and things fall apart.
devtools/test/unittest_httptest.py
devtools/test/unittest_webtest.py
--- a/devtools/test/unittest_httptest.py	Wed Nov 19 11:59:08 2014 +0100
+++ b/devtools/test/unittest_httptest.py	Thu Sep 25 10:50:23 2014 +0200
@@ -41,7 +41,7 @@
 
 
 class TwistedCWIdentTC(CubicWebServerTC):
-
+    test_db_id = 'httptest-cwident'
     anonymous_allowed = False
     tags = CubicWebServerTC.tags | Tags(('auth',))
 
--- a/devtools/test/unittest_webtest.py	Wed Nov 19 11:59:08 2014 +0100
+++ b/devtools/test/unittest_webtest.py	Thu Sep 25 10:50:23 2014 +0200
@@ -15,6 +15,7 @@
 
 
 class CWTIdentTC(CubicWebTestTC):
+    test_db_id = 'webtest-ident'
     anonymous_allowed = False
     tags = CubicWebTestTC.tags | Tags(('auth',))