Author: ramiro
Date: 2011-01-14 18:15:39 -0600 (Fri, 14 Jan 2011)
New Revision: 15208

Modified:
   django/trunk/tests/regressiontests/multiple_database/tests.py
Log:
Enhanced slightly the tests added in r15185 to demonstrate that #14948 doesn't 
affect trunk. Refs #14948. Thanks Harm Geerts.

Modified: django/trunk/tests/regressiontests/multiple_database/tests.py
===================================================================
--- django/trunk/tests/regressiontests/multiple_database/tests.py       
2011-01-14 23:30:17 UTC (rev 15207)
+++ django/trunk/tests/regressiontests/multiple_database/tests.py       
2011-01-15 00:15:39 UTC (rev 15208)
@@ -1851,7 +1851,7 @@
         if not hasattr(model, '_meta'):
             raise ValueError
 
-class RouterM2MThroughTestCase(TestCase):
+class RouterModelArgumentTestCase(TestCase):
     multi_db = True
 
     def setUp(self):
@@ -1861,7 +1861,7 @@
     def tearDown(self):
         router.routers = self.old_routers
 
-    def test_m2m_through(self):
+    def test_m2m_collection(self):
         b = Book.objects.create(title="Pro Django",
                                 published=datetime.date(2008, 12, 16))
 
@@ -1872,3 +1872,13 @@
         b.authors.remove(p)
         # test clear
         b.authors.clear()
+        # test setattr
+        b.authors = [p]
+        # test M2M collection
+        b.delete()
+
+    def test_foreignkey_collection(self):
+        person = Person.objects.create(name='Bob')
+        pet = Pet.objects.create(owner=person, name='Wart')
+        # test related FK collection
+        person.delete()

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to