From b9a2b58dd74757184ef94206f09e9db1f536e4cb Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 19 Mar 2014 11:09:38 -0400 Subject: - 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 --- test/ext/test_mutable.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/ext') 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() -- cgit v1.2.1