diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2006-06-12 12:49:14 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2006-06-12 12:49:14 +0000 |
| commit | 686c5a2f884b0b5f318a6dd6b6ba7d09ff0180f3 (patch) | |
| tree | a77ca525d827963063f3f035bd499b69518b8443 /tests | |
| parent | bff39bfb8cbc43bbeb78897c76583ab942927a0a (diff) | |
Fixed the empty model saving case so that it retrieves the primary key id. Also
updated the tests to test this case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3118 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/modeltests/empty/models.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/modeltests/empty/models.py b/tests/modeltests/empty/models.py index 3befbd55a5..c50878398d 100644 --- a/tests/modeltests/empty/models.py +++ b/tests/modeltests/empty/models.py @@ -12,10 +12,13 @@ class Empty(models.Model): API_TESTS = """ >>> m = Empty() +>>> m.id >>> m.save() >>> m2 = Empty() >>> m2.save() >>> len(Empty.objects.all()) 2 +>>> m.id is not None +True """ |
