From b5ed20434e5faa739f7bc753319986dd9dfac7f7 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 15 Aug 2005 15:43:59 +0000 Subject: [PATCH] Added unit test that tests #323 -- currently fails for MySQL and passes for PostgreSQL git-svn-id: http://code.djangoproject.com/svn/django/trunk@506 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/testapp/models/basic.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/testapp/models/basic.py b/tests/testapp/models/basic.py index 3668820c94..c51ceccb9d 100644 --- a/tests/testapp/models/basic.py +++ b/tests/testapp/models/basic.py @@ -132,6 +132,17 @@ datetime.datetime(2005, 7, 31, 12, 30) >>> a8.save() >>> articles.get_object(id__exact=8).pub_date datetime.datetime(2005, 7, 31, 12, 30, 45) +>>> a8.id +8L + +# Saving an object again shouldn't create a new object -- it just saves the old one. +>>> a8.save() +>>> a8.id +8L +>>> a8.headline = 'Updated article 8' +>>> a8.save() +>>> a8.id +8L """ from django.conf import settings