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

Add load_fixtures_from_file #21

Closed RoPP closed 5 years ago

RoPP commented 8 years ago

This is a rework of #16 The code of load_fixtures_from_file is mostly a cut and paste from setup.

adamhadani commented 8 years ago

:+1: I think it will be great to have a simple extension to use this project not just in limited context of unit-tests, but also more generally to load up seed fixture data via CLI, similar to Django. (It would be even better to have the 'dumpdata' function to generate these files from existing DB records but that's for a separate PR/Issue.. :)

ornj commented 8 years ago

@croach Can this get merged?

vpassapera commented 5 years ago

Please merge this, I am trying to use fixtures as a way to seed a test DB before doing unit tests (for unit tests the lib already works well)

croach commented 5 years ago

@vpassapera I wasn't able to merge in the change as is due to changes in Flask-SQLAlchemy since the PR was submitted. I was able to get the changes merged in with slight changes and the tests working again. So, I'm going to close this ticket since it is effectively complete.

croach commented 5 years ago

@vpassapera additionally, I've just uploaded the most recent version (0.3.8) to PyPI, so you can simply do a pip install --upgrade Flask-Fixtures to get the latest version, if you already have it installed.

vpassapera commented 5 years ago

TY!