Holly Becker · @hwesta
112 followers · 63 posts · Server wandering.shop

Question involving

Currently, we run end-to-end API tests against a sqlite DB, which takes about 2 seconds. I want to switch to postgres (what we use in prod) but that makes the tests take a lot longer, about 12 seconds.

Is there a way to improve this?

What might be causing the slowness? Where can I look? Is it networking to the docker container? Postgres enforcing constraints? Running flush after every DB fixture? Something else?

#python #sqlalchemy #factoryboy #postgresql #pytest

Last updated 1 year ago

Nikita :blobcatfakeverified: · @kytta
239 followers · 459 posts · Server fosstodon.org

2 hours spent writing a custom migration for a huge model refactor
8 hours spent writing tests for it (albeit the project didn't have any proper testing setup in place)

And oh my God, it was worth it, since I have already found two bugs I would've just miss otherwise. Learning a lot along the way, too: , , . So exciting 🤩 I think I definitely picked the right career path 😅

#django #pytest #faker #factoryboy

Last updated 2 years ago