testing sqlite #10674
Replies: 2 comments
-
Hi, Googling for https://smirnov-am.github.io/pytest-testing_database/ Did not read thoroughly, but it does seem up-to-date at a glance. Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Hi, before going anywhere can you explain a little bit more how you do these CRUD operations ? Is it through an API ? And what you want to do are integration tests. Are you sure this the right kind of test ? Whether or not you need to test the data, you should test the real data by testing the HTTP calls. There's numerous tools for that, check out Postman. Otherwise, just mock method calls that interact with sqlite inside your unit tests. @bpolasek519 keep me updated 📫 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I'm a new dev and I am building a web app and using sqlite to cache my data. My boss (rightfully) got irritated with me yesterday that I wasn't using tests to test the CRUD operations. I haven't mainly because I'm not sure how. I have used pytest on other parts of the project, but haven't jumped in with databases yet. Can anyone direct me (or help me) to a very straightforward way of how to use pytest with databases?
I'm also not using SQLAlchemy which a lot of tutorials I have seen have. Not sure if it's that important or if I can do without. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions