Flask-Fixtures
Flask-Fixtures copied to clipboard
A simple library for adding database fixtures for unit tests using nothing but JSON or YAML.
Replace the current way of creating custom loaders with a setuptools-based plugin architecture. See the links below for details on how to create a plugin architecture using pgk_resources: - [Pylons...
In several situations, the developer has added constants to their code that the test test writer would like to reference in the tests. Doing so allows tests to remain unchanged...
When I set app.config['FIXTURES_DIRS'], FIXTURES_DIRS path and "current_app.root_path + '/fixtures'" together have a same file 'author.json', flask-fixtures will get "current_app.root_path + '/fixtures/author.json'" file. I think that default can use "current_app.root_path...
app.py ``` class model(object): class Book(db.Model): bookid = db.Column(db.Integer, primary_key=True) name = db.Column(db.Unicode, nullable=False) ``` bookdata.json ``` { "model": "app.model.Book", "records": [] } ``` the error is module `app.model` not...
I have faced an issue with Flask's `db.Table`. Here's my setup: ``` # models.py: class Project(db.Model): id = db.Column(db.Integer, primary_key=True) interviewers = db.relationship('User', secondary='project_interviewer') project_interviewer = db.Table( 'project_interviewer', db.Column('user_id', db.Integer,...
This may be an issue with me not understanding fixtures and/or SQLAlchemy, but any assistance would be great! I have some data dumped from an MS SQL DB, which is...
The py.test and nose libraries support standalone test functions (the unittest standard library does not). I'd like to add support for these standalone functions to the Flask-Fixtures library. If we...
The idea here is that, instead of creating two separate fixture objects, when one is a child of the other, it would be nice if we could nest them. For...
If you use fixtures with a class that does it's own setup and teardown any tables that were already created stick around and that means that any data within them...