summaryrefslogtreecommitdiff
path: root/tests/regressiontests/mongodb/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/regressiontests/mongodb/tests.py')
-rw-r--r--tests/regressiontests/mongodb/tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/regressiontests/mongodb/tests.py b/tests/regressiontests/mongodb/tests.py
index cbf0dcbcd8..75a2dbf08b 100644
--- a/tests/regressiontests/mongodb/tests.py
+++ b/tests/regressiontests/mongodb/tests.py
@@ -9,3 +9,12 @@ class MongoTestCase(TestCase):
self.assertTrue(b.pk is not None)
self.assertEqual(b.name, "Bruce Springsteen")
self.assertTrue(b.good)
+
+ def test_update(self):
+ l = Artist.objects.create(name="Lady Gaga", good=True)
+ self.assertTrue(l.pk is not None)
+ pk = l.pk
+ # Whoops, we screwed up.
+ l.good = False
+ l.save()
+ self.assertEqual(l.pk, pk)