Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added unit test that tests #323 -- currently fails for MySQL and pass…

…es for PostgreSQL

git-svn-id: http://code.djangoproject.com/svn/django/trunk@506 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b5ed20434e5faa739f7bc753319986dd9dfac7f7 1 parent db127b7
Adrian Holovaty adrianholovaty authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 tests/testapp/models/basic.py
11 tests/testapp/models/basic.py
View
@@ -132,6 +132,17 @@ class Article(meta.Model):
>>> 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
Please sign in to comment.
Something went wrong with that request. Please try again.