Skip to content

alternative database setup shemes #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RonnyPfannschmidt opened this issue May 21, 2013 · 3 comments
Closed

alternative database setup shemes #37

RonnyPfannschmidt opened this issue May 21, 2013 · 3 comments

Comments

@RonnyPfannschmidt
Copy link
Member

at work we have a large set of fixtures, an option to copy a database from a template would be helpful

it can be file copies in sqlite and db template in postgresql

@pelme
Copy link
Member

pelme commented Dec 26, 2014

The current plan is to provide more granular and documented fixtures for each part of the db setup that can be replaced in a project conftest.py.

I.e. putting something like this in a project conftest.py would override the default pytest-django provided django_db_setup fixture that usually creates the database with syncdb/migrations:

@pytest.fixture(scope='session')
def django_db_setup():
    shutil.copy('sqlite_template.db', 'test_sqlite.db')

Do you have any thoughts on this Ronny?

@RonnyPfannschmidt
Copy link
Member Author

looks nice

@blueyed
Copy link
Contributor

blueyed commented Aug 23, 2018

Closing, since it is supposed to be fixed in 3.0.

@blueyed blueyed closed this as completed Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants