diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2009-05-19 13:42:38 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2009-05-19 13:42:38 +0000 |
| commit | 2e24596001bce6e827e31510241834ccff76979f (patch) | |
| tree | 216c84bea7dfd4c742bb2289a21126283e0b0da4 /tests | |
| parent | b9b9ca334e335a2678f0ae560a9182ca5ed1bfcf (diff) | |
Fixed #11116 -- Corrected the deletion of proxy objects. Thanks to Samuel Adam for the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10824 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/modeltests/proxy_models/models.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/modeltests/proxy_models/models.py b/tests/modeltests/proxy_models/models.py index baa58cba03..4b3f7d925d 100644 --- a/tests/modeltests/proxy_models/models.py +++ b/tests/modeltests/proxy_models/models.py @@ -276,6 +276,15 @@ True >>> UserProxyProxy.objects.all() [<UserProxyProxy: Bruce>] +# Proxy objects can be deleted +>>> u2 = UserProxy.objects.create(name='George') +>>> UserProxy.objects.all() +[<UserProxy: Bruce>, <UserProxy: George>] +>>> u2.delete() +>>> UserProxy.objects.all() +[<UserProxy: Bruce>] + + # We can still use `select_related()` to include related models in our querysets. >>> country = Country.objects.create(name='Australia') >>> state = State.objects.create(name='New South Wales', country=country) |
