Closed leplatrem closed 8 years ago
LGTM but lacks documentation (I see there is some in the CHANGELOG but I don't believe that's enough)
I'm puzzled :
View transactions tests pass when I run them isolated:
nosetests -s --with-mocha-reporter cliquet.tests.resource.test_events cliquet.tests.test_listeners cliquet.tests.test_views_transaction
But they don't if I run the whole test suite make test-once
. The resource events are simply not triggered :(
Ok, found it.
In test_permission.py
we alter request.registry.settings
to readonly
. Settings was not a copy of DEFAULT_SETTINGS
and the tests were altering the default settings!
Great job r+ with nit.
(revamp of #644)
Change subscribtion of listeners to#647AfterResourceChanged
(because of fire-n-forget)tldr: We need two kinds of events:
before
events to run within transaction and «rollbackable».after
events to run irreversible actions (that can fail)Feedback/Critics/Stones/Hugs/Flowers welcome!