jeudi 28 juin 2018

Do I need a database cleaner in Python?

I come from a Rails background, and am new to Python. Unfortunately, my googling and searching SO has been unsuccessful.

We are building a Python app with no framework. We're using pytest for testing, and factory-boy for factories.

I'm wondering if we need a database cleaner for our app. I have found the pytest_sessionstart and pytest_sessionfinish hooks, which would seem like a good place to do the cleaning. But I can't figure out if we even need such a thing as a database cleaner like we use in Rails testing.

Any information or assistance is greatly appreciated! If I do need some sort of cleaner, explicit instructions or links to docs would be very useful.

Aucun commentaire:

Enregistrer un commentaire