Permalink
Browse files

[multi-db] Added basic tests for Manager.db attribute.

  • Loading branch information...
1 parent d96e3c9 commit 22afa65b4b83baa9e9ee1980f96d37ddb5d0adb2 @jpellerin jpellerin committed Jul 19, 2006
Showing with 23 additions and 0 deletions.
  1. +23 −0 tests/othertests/manager_db.py
View
23 tests/othertests/manager_db.py
@@ -0,0 +1,23 @@
+from django.db import models
+
+def run_tests(verbosity=0):
+ class Insect(models.Model):
+ common_name = models.CharField(maxlength=64)
+ latin_name = models.CharField(maxlength=128)
+
+ class Meta:
+ app_label = 'manager_db'
+
+ m = Insect.objects
+ db = Insect.objects.db
+
+ assert db
+ assert db.connection
+ assert db.connection.cursor
+ assert db.backend
+ assert db.backend.quote_name
+ assert db.get_creation_module
+
+if __name__ == '__main__':
+ run_tests()
+ print "ok"

0 comments on commit 22afa65

Please sign in to comment.