bypass test database creation
authorjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Mon, 11 Apr 2011 11:22:54 +0000 (11:22 +0000)
committerjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Mon, 11 Apr 2011 11:22:54 +0000 (11:22 +0000)
git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@1030 e071eeec-0327-468d-9b6a-08194a12b294

ldapdb/backends/ldap/base.py

index 85b857fb8fd4d6d7913ebe2bf9a8577928d122d6..79d937fe0d23114f6ea7abf6977bbc942451d8c1 100644 (file)
 import ldap
 
 from django.db.backends import BaseDatabaseFeatures, BaseDatabaseOperations, BaseDatabaseWrapper
 import ldap
 
 from django.db.backends import BaseDatabaseFeatures, BaseDatabaseOperations, BaseDatabaseWrapper
+from django.db.backends.creation import BaseDatabaseCreation
+
+class DatabaseCreation(BaseDatabaseCreation):
+    def create_test_db(self, verbosity=1, autoclobber=False):
+        """
+        Creates a test database, prompting the user for confirmation if the
+        database already exists. Returns the name of the test database created.
+        """
+        pass
+
+    def destroy_test_db(self, old_database_name, verbosity=1):
+        """
+        Destroy a test database, prompting the user for confirmation if the
+        database already exists. Returns the name of the test database created.
+        """
+        pass
 
 class DatabaseCursor(object):
     def __init__(self, ldap_connection):
 
 class DatabaseCursor(object):
     def __init__(self, ldap_connection):
@@ -55,6 +71,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
         super(DatabaseWrapper, self).__init__(*args, **kwargs)
 
         self.charset = "utf-8"
         super(DatabaseWrapper, self).__init__(*args, **kwargs)
 
         self.charset = "utf-8"
+        self.creation = DatabaseCreation(self)
         self.features = DatabaseFeatures(self)
         self.ops = DatabaseOperations()
 
         self.features = DatabaseFeatures(self)
         self.ops = DatabaseOperations()