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

Use setup/teardown from Django (TransactionTestCase) #203

Closed

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Feb 8, 2015

Use _pre_setup and _post_teardown from Django also for TransactionTestCase.

This would provide additional features, and makes the behavior more consistent.

It does not work with Django < 1.5 however, which is now special-cased.

I'm going to add some test(s) for the new behavior later.

@blueyed blueyed changed the title Use setup/teardown from Django (TransactionTestCase) WIP: use setup/teardown from Django (TransactionTestCase) Feb 8, 2015
@blueyed blueyed force-pushed the use-django-transactiontestcase branch from 3fb43bd to d594738 Compare February 10, 2015 19:16
@blueyed blueyed force-pushed the use-django-transactiontestcase branch from d594738 to 846e130 Compare March 2, 2015 17:44
@pelme
Copy link
Member

pelme commented Mar 29, 2015

This looks very good, using TransactionTestCase directly is much better than doing the flushing by ourselves. Is there any need for new tests for this?

Shouldn't the existing tests for transactional tests should be enough?

@blueyed
Copy link
Contributor Author

blueyed commented Mar 29, 2015

Shouldn't the existing tests for transactional tests should be enough?

I'm not sure if the existing tests are specific enough, but this can be improved / fixed when any issues are being reported from this.

I'll merge it for now.

@blueyed blueyed closed this in 0ec741b Mar 29, 2015
@blueyed blueyed deleted the use-django-transactiontestcase branch March 29, 2015 19:16
@blueyed blueyed changed the title WIP: use setup/teardown from Django (TransactionTestCase) Use setup/teardown from Django (TransactionTestCase) Sep 1, 2015
mfa pushed a commit to aexeagmbh/pytest-django that referenced this pull request May 17, 2017
beyondgeeks pushed a commit to beyondgeeks/django-pytest that referenced this pull request Sep 6, 2022
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.

2 participants