croach / Flask-Fixtures

A simple library for adding database fixtures for unit tests using nothing but JSON or YAML.
MIT License
63 stars 30 forks source link

Run fixtures in every test #36

Open javierseixas opened 5 years ago

javierseixas commented 5 years ago

I would like to be able to run the fixtures every test, for starting each one in a clean and controlled way.

Right now, it seems that only sets the database and the fixtures at the beginning, so I'm having conflicts in two different tests, each one tests user creation, but the second throws an error cos the email (unique index in Database) was created in the previous test.

So, my question is how I can run the fixtures every test, despite of slowing down the suite.