You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really like your boilerplate here - there's a lot of good practices to study I think. I stumbled upon one thing that puzzles me a bit though. You add middleware to create a database session for each request and close it again. But you also create a dependency to do the same if I'm not mistaken?
I imagine that you first implemented the middleware approach but realized you could solve it with dependency injection instead? I'm curious if I'm wrong in my perception?
The text was updated successfully, but these errors were encountered:
Another thing that puzzles me is get_test_db_url() in conftest.py. To me it looks like it points to a dbname that doesn't exist? But maybe that's not a problem with postgres?
Another thing that puzzles me is get_test_db_url() in conftest.py. To me it looks like it points to a dbname that doesn't exist? But maybe that's not a problem with postgres?
This is because it's a test fixture, you don't want it to point to a real database.
I really like your boilerplate here - there's a lot of good practices to study I think. I stumbled upon one thing that puzzles me a bit though. You add middleware to create a database session for each request and close it again. But you also create a dependency to do the same if I'm not mistaken?
I imagine that you first implemented the middleware approach but realized you could solve it with dependency injection instead? I'm curious if I'm wrong in my perception?
I have the same question 😉
BTW, thanks for the repo, @Buuntu
Hi @Buuntu
I really like your boilerplate here - there's a lot of good practices to study I think. I stumbled upon one thing that puzzles me a bit though. You add middleware to create a database session for each request and close it again. But you also create a dependency to do the same if I'm not mistaken?
I imagine that you first implemented the middleware approach but realized you could solve it with dependency injection instead? I'm curious if I'm wrong in my perception?
The text was updated successfully, but these errors were encountered: