Hi, Don't know for the testing environment... But why don't you use PersistentList / PersistentMapping classes instead of classis list/dict for your inner properties? Regards, Thierry -- https://www.ulthar.net -- http://pyams.readthedocs.io
Le dim. 24 févr. 2019 à 08:49, Gerhard Schmidt <esta...@augusta.de> a écrit : > Hi, > > I'm writing a pyramid app using traversal and ZODB. Right now i writing > unit tests and try to test if the _p_changed attribute is set after a > method that changes a persistent object. > > The problem is that _p_changed is always False when running in the > testrunner. Even after I do obj._p_changed = True obj._p_changed is > still False. > > In running environment everything works fine. But I often forget the > self._p_changed = True after modifying lists or dicts inside a > persistent object. So i really like to test if it's get set. > > Is there a way to test if a persistent object would be saved when the > transaction is committed. > > Regards > Estartu > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pylons-discuss+unsubscr...@googlegroups.com. > To post to this group, send email to pylons-discuss@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/pylons-discuss/5b2f3caa-0c8e-dabb-bee0-d16868229771%40augusta.de > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAPX_VWBv%2B0R9V5%3DWrrECWpJAxuBCM9ryxcCoK_7r5fuufb9vYA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.