diff options
| author | Ramiro Morales <cramm0@gmail.com> | 2010-11-16 22:09:13 +0000 |
|---|---|---|
| committer | Ramiro Morales <cramm0@gmail.com> | 2010-11-16 22:09:13 +0000 |
| commit | f3d07047834b0a4ea3bde2b46643b327a659364e (patch) | |
| tree | 1272a59fd37f8056908c0c2de1d145ae518df76d /tests/regressiontests/multiple_database/tests.py | |
| parent | ea145923fcb38ce32dabb703576b94477dc5811b (diff) | |
Fixed #14691 -- Made ForeignKey.validate() use the right database. Thanks Marco Paolini for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14580 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/multiple_database/tests.py')
| -rw-r--r-- | tests/regressiontests/multiple_database/tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/regressiontests/multiple_database/tests.py b/tests/regressiontests/multiple_database/tests.py index 22ee74c697..04ab2bb925 100644 --- a/tests/regressiontests/multiple_database/tests.py +++ b/tests/regressiontests/multiple_database/tests.py @@ -581,6 +581,12 @@ class QueryTestCase(TestCase): self.assertEquals(Person.objects.using('other').count(), 0) self.assertEquals(Pet.objects.using('other').count(), 0) + def test_foreign_key_validation(self): + "ForeignKey.validate() uses the correct database" + mickey = Person.objects.using('other').create(name="Mickey") + pluto = Pet.objects.using('other').create(name="Pluto", owner=mickey) + self.assertEquals(None, pluto.full_clean()) + def test_o2o_separation(self): "OneToOne fields are constrained to a single database" # Create a user and profile on the default database |
