Question involving #python #sqlalchemy #factoryboy #postgresql #pytest
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
2 hours spent writing a custom #Django 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: #pytest, #faker, #FactoryBoy. So exciting 🤩 I think I definitely picked the right career path 😅
#django #pytest #faker #factoryboy