[test/ldap] have RQL2LDAPFilterTC use its own database
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Tue, 23 Apr 2013 17:58:20 +0200
changeset 8903 192a748550c7
parent 8902 9edfa3660bf4
child 8904 030463e2b620
[test/ldap] have RQL2LDAPFilterTC use its own database I do not know what RQL2LDAPFilterTC is about and why it does this strange reuse of LDAPUserSourceTC pre_setup_database but it is certainly a good idea to have it use a dedicated database-cache.
server/test/unittest_ldapsource.py
--- a/server/test/unittest_ldapsource.py	Tue Apr 23 16:25:56 2013 +0200
+++ b/server/test/unittest_ldapsource.py	Tue Apr 23 17:58:20 2013 +0200
@@ -614,8 +614,8 @@
 
     def setUp(self):
         self.handler = get_test_db_handler(LDAPUserSourceTC.config)
-        self.handler.build_db_cache('ldap-user', LDAPUserSourceTC.pre_setup_database)
-        self.handler.restore_database('ldap-user')
+        self.handler.build_db_cache('ldap-rqlgenerator', LDAPUserSourceTC.pre_setup_database)
+        self.handler.restore_database('ldap-rqlgenerator')
         self._repo = repo = self.handler.get_repo()
         self._schema = repo.schema
         super(RQL2LDAPFilterTC, self).setUp()