Currently the backend tests are not idempotent, so you have to keep the state of the test db in your head as you write tests. This is of course difficult and annoying, not to mention less clear / explicit since adding fixtures for the state needed by a test can actually break it, due to unique constraints.
This PR runs all tests in an outer transaction, which is always rolled back (fixes #91).
Finally, renames the persistent session to persistent_session so this is still an option (for e.g. larger gerrydb tables needed for testing).
Reviewers
Primary: @bailliekova @nofurtherinformation
Secondary: @mapmeld @mariogiampieri
Checklist
[ ] Added/Updated related documentation (if applicable).
[x] Added/Updated related unit tests (if applicable).
Description
persistent_session
so this is still an option (for e.g. larger gerrydb tables needed for testing).Reviewers
Checklist
Screenshots (if applicable):