diff options
| author | Jason Pellerin <jpellerin@gmail.com> | 2006-07-03 20:57:52 +0000 |
|---|---|---|
| committer | Jason Pellerin <jpellerin@gmail.com> | 2006-07-03 20:57:52 +0000 |
| commit | 062733a946b360eead2355ab9c1a21ea14c22e5f (patch) | |
| tree | 63e43239c84c8a63a99da5ba2399cf73c4883023 /tests/modeltests/multiple_databases | |
| parent | f194f74aa62727e4624b3e6e1e06fdbeebc4f3b5 (diff) | |
[multi-db] Began integrating Manager schema manipulation methods into django.core.management. Updated multiple db models test to include operations on installed models.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3267 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests/multiple_databases')
| -rw-r--r-- | tests/modeltests/multiple_databases/models.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/modeltests/multiple_databases/models.py b/tests/modeltests/multiple_databases/models.py index 3c89c83e75..11915dee47 100644 --- a/tests/modeltests/multiple_databases/models.py +++ b/tests/modeltests/multiple_databases/models.py @@ -92,5 +92,18 @@ True False >>> Artist._meta.connection.settings == Vehicle._meta.connection.settings False - + +# Managers use their models' connections + +>>> a = Artist(name="Paul Klee", alive=False) +>>> a.save() +>>> w = Widget(code='100x2r', weight=1000) +>>> w.save() +>>> v = Vehicle(make='Chevy', model='Camaro', year='1966') +>>> v.save() +>>> artists = Artist.objects.all() +>>> list(artists) +[<Artist: Paul Klee>] +>>> artists[0]._meta.connection.settings == connections['django_test_db_a'].settings +True """ |
