summaryrefslogtreecommitdiff
path: root/test/ext/test_mutable.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-06-03 18:23:23 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-06-03 18:23:23 -0400
commit3a13047fb06d698e0440895281c484199e0a95a5 (patch)
treef3027214ea733fb5f34591577c98861d5973be71 /test/ext/test_mutable.py
parentf1bdc3e999b4ad76515a6452099e3c26d7b4228b (diff)
downloadsqlalchemy-3a13047fb06d698e0440895281c484199e0a95a5.tar.gz
Fixed bug where :class:`.MutableDict` didn't report a change event
when ``clear()`` was called. [ticket:2730]
Diffstat (limited to 'test/ext/test_mutable.py')
-rw-r--r--test/ext/test_mutable.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ext/test_mutable.py b/test/ext/test_mutable.py
index 4516e3ac2..bda9e5382 100644
--- a/test/ext/test_mutable.py
+++ b/test/ext/test_mutable.py
@@ -74,6 +74,18 @@ class _MutableDictTestBase(object):
eq_(f1.data, {'a': 'c'})
+ def test_clear(self):
+ sess = Session()
+
+ f1 = Foo(data={'a': 'b'})
+ sess.add(f1)
+ sess.commit()
+
+ f1.data.clear()
+ sess.commit()
+
+ eq_(f1.data, {})
+
def test_replace(self):
sess = Session()
f1 = Foo(data={'a': 'b'})