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

Fixture tearDown doesn't handle constraints well #155

Open
rrauenza opened this issue Feb 28, 2014 · 1 comment
Open

Fixture tearDown doesn't handle constraints well #155

rrauenza opened this issue Feb 28, 2014 · 1 comment

Comments

@rrauenza
Copy link

I get constraint errors during fixture teardown. At the moment I'm injecting a db flush to get around it, which seems to work ok.

   @classmethod
    def _fixture_teardown(cls):
        fixtures = getattr(cls, 'fixtures', None)
        _fb_should_teardown_fixtures = getattr(cls, '_fb_should_teardown_fixtures', True)
         # _fixture_teardown needs help with constraints.
         if fixtures and _fb_should_teardown_fixtures:
             call_command('flush', interactive=False, verbosity=1)
         return super(MyFastFixtureTestCase, cls)._fixture_teardown()
@jwhitlock
Copy link
Contributor

There are a number of bugs around fixtures. Can you provide a test case or a public project that reproduces the error?

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

2 participants