diff --git a/tests/regressiontests/multiple_database/tests.py b/tests/regressiontests/multiple_database/tests.py
a
|
b
|
|
1 | 1 | import datetime |
2 | 2 | import pickle |
3 | | import sys |
4 | 3 | from StringIO import StringIO |
5 | 4 | |
6 | 5 | from django.conf import settings |
7 | | from django.contrib.auth.models import User |
| 6 | from django.contrib.auth.models import User, Group |
8 | 7 | from django.core import management |
9 | 8 | from django.db import connections, router, DEFAULT_DB_ALIAS |
10 | | from django.db.utils import ConnectionRouter |
11 | 9 | from django.test import TestCase |
12 | 10 | |
13 | 11 | from models import Book, Person, Pet, Review, UserProfile |
… |
… |
|
1575 | 1573 | command_output = new_io.getvalue().strip() |
1576 | 1574 | self.assertTrue('"email": "alice@example.com",' in command_output) |
1577 | 1575 | |
| 1576 | def test_related_accessor(self): |
| 1577 | "Check that related accessors validate the through model" |
| 1578 | user = User.objects.create_user('alice', 'alice@example.com') |
| 1579 | group = Group.objects.create(name='Users') |
| 1580 | user.groups = [group] |
| 1581 | self.assertEquals(Group.objects.using('other').filter(user=user).count(), 1) |
| 1582 | |
1578 | 1583 | _missing = object() |
1579 | 1584 | class UserProfileTestCase(TestCase): |
1580 | 1585 | def setUp(self): |