summaryrefslogtreecommitdiff
path: root/test/ext
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-03-19 11:09:38 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-03-19 11:09:38 -0400
commitb9a2b58dd74757184ef94206f09e9db1f536e4cb (patch)
tree58dd9631ac97aa1b0d5e335f3f3eab5c7c872625 /test/ext
parentfd8dbf8e78981187d091dcc25e63ddfb4e56a5f8 (diff)
downloadsqlalchemy-b9a2b58dd74757184ef94206f09e9db1f536e4cb.tar.gz
- Fixed bug in mutable extension as well as
:func:`.attributes.flag_modified` where the change event would not be propagated if the attribute had been reassigned to itself. fixes #2997
Diffstat (limited to 'test/ext')
-rw-r--r--test/ext/test_mutable.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ext/test_mutable.py b/test/ext/test_mutable.py
index ee1b8075e..39cfa7ac5 100644
--- a/test/ext/test_mutable.py
+++ b/test/ext/test_mutable.py
@@ -96,6 +96,17 @@ class _MutableDictTestBase(object):
sess.commit()
eq_(f1.data, {'b': 'c'})
+ def test_replace_itself_still_ok(self):
+ sess = Session()
+ f1 = Foo(data={'a': 'b'})
+ sess.add(f1)
+ sess.flush()
+
+ f1.data = f1.data
+ f1.data['b'] = 'c'
+ sess.commit()
+ eq_(f1.data, {'a': 'b', 'b': 'c'})
+
def test_pickle_parent(self):
sess = Session()