Integration tests with a postgres database? /u/nikola_milovic Python Education

Hey everyone, I was wondering what setup are you guys using to run integration tests with postgres?

I am using FastAPI, SQLAlchemy and testcontainers, but I am not too happy with my setup. In go it is quite easy to setup, and to clean the DB after every test, but in python I found this quite tricky and difficult, probably due to my lack of knowledge. But I also couldn’t find much information online, no articles or tutorials on the topic…

I am looking for a fast iteration setup so I’d reuse the postgres instance but somehow clean it/ snapshot it between tests

What are your approaches and thoughts?

submitted by /u/nikola_milovic
[link] [comments]

​r/learnpython Hey everyone, I was wondering what setup are you guys using to run integration tests with postgres? I am using FastAPI, SQLAlchemy and testcontainers, but I am not too happy with my setup. In go it is quite easy to setup, and to clean the DB after every test, but in python I found this quite tricky and difficult, probably due to my lack of knowledge. But I also couldn’t find much information online, no articles or tutorials on the topic… I am looking for a fast iteration setup so I’d reuse the postgres instance but somehow clean it/ snapshot it between tests What are your approaches and thoughts? submitted by /u/nikola_milovic [link] [comments] 

Hey everyone, I was wondering what setup are you guys using to run integration tests with postgres?

I am using FastAPI, SQLAlchemy and testcontainers, but I am not too happy with my setup. In go it is quite easy to setup, and to clean the DB after every test, but in python I found this quite tricky and difficult, probably due to my lack of knowledge. But I also couldn’t find much information online, no articles or tutorials on the topic…

I am looking for a fast iteration setup so I’d reuse the postgres instance but somehow clean it/ snapshot it between tests

What are your approaches and thoughts?

submitted by /u/nikola_milovic
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *