Skip to content

Run each test in there own transaction#223

Closed
sweenu wants to merge 1 commit intofastapi:masterfrom
sweenu:master
Closed

Run each test in there own transaction#223
sweenu wants to merge 1 commit intofastapi:masterfrom
sweenu:master

Conversation

@sweenu
Copy link
Copy Markdown

@sweenu sweenu commented Jun 26, 2020

This is the first thing I did when I started using the template. It allows me to never have anything really committed to database when running my tests. I don't know how you run your tests but running them each in their own transaction that is then rollbacked and leave no trace whatsoever is to me the cleanest solution when running tests against a database.

I also like the fact that it gives an example of using dependency override.

@sweenu sweenu force-pushed the master branch 3 times, most recently from 8a272a3 to e4ee84d Compare June 27, 2020 19:43
@tiangolo
Copy link
Copy Markdown
Member

tiangolo commented Dec 6, 2020

Thanks for your interest! Yeah, that could be interesting, it probably needs some other changes 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants