-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commit transaction after post processors #511
Conversation
The build error is my fault, you can ignore it. I'll take a look at this. Thanks! |
Is there any way to add a unit test for at least one of these methods? For example, can I use a postprocessor to check that the session has been flushed but not committed, and then check that a session has been committed after the test client receives the response from the server? Also, thanks for finding my TODO comments in the code and providing a fix for them. It might be nice to add a comment in the code explaining why the flush occurs there and why the commit occurs later, as a reminder to future readers of the code (me, for example). |
Alright. I wrote a test and applied it to different processors. I hope that this meets your expectations. |
@@ -42,6 +42,7 @@ | |||
from flask.ext.restless import DeserializationException | |||
from flask.ext.restless import SerializationException | |||
from flask.ext.restless import simple_serialize | |||
from flask.ext.restless import ProcessingException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please alphabetize the imports.
How does this interact with the The last thing to do is to update the changelog and update the documentation to state exactly when the session is flushed, committed, and rolled back, but I can do that myself. I'll merge this soon, thanks for your work! |
You're right. I've corrected those issues. I didn't think about those two functions. |
I've squashed and rebased my branch to simplify the history and to solve merge conflicts. |
Quick solution for Issue #508