Skip to content
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

Add fixtures to clear the database before or after tests #3783

Merged
merged 3 commits into from
Feb 21, 2020

Conversation

greschd
Copy link
Member

@greschd greschd commented Feb 21, 2020

The current 'clear_database' fixture clears the DB after the test has run. Since clearing it before the tests is also a common use case, this adds a 'clear_database_before_test' fixture. For naming consistency, we rename 'clear_database' to 'clear_database_after_test', and turn 'clear_database' into an
alias for that function for backwards compatibility.

The current 'clear_database' fixture clears the DB after the test
has run. Since clearing it before the tests is also a common use
case, this adds a 'clear_database_before_test' fixture. For
naming consistency, we rename 'clear_database' to
'clear_database_after_test', and turn 'clear_database' into an
alias for that function for backwards compatibility.
@greschd greschd requested a review from ltalirz February 21, 2020 08:13
@sphuber
Copy link
Contributor

sphuber commented Feb 21, 2020

Maybe try to get this merged before we merge your cache PR so that one can remove the ad-hoc fix for the database reset

Copy link
Member

@ltalirz ltalirz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @greschd - looks good & have nothing to add

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants