Adds utility to defeat segfaults in tests. Hopefully you won’t need it.
This commit is contained in:
parent
63dfd353c1
commit
397ba207bb
1 changed files with 11 additions and 0 deletions
|
@ -5,6 +5,7 @@ from decimal import Decimal
|
|||
from django.contrib.auth.models import User
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.core.management import call_command
|
||||
from django.test import TestCase
|
||||
|
||||
from registrasion.models import commerce
|
||||
|
@ -24,6 +25,16 @@ class RegistrationCartTestCase(SetTimeMixin, TestCase):
|
|||
def setUp(self):
|
||||
super(RegistrationCartTestCase, self).setUp()
|
||||
|
||||
def tearDown(self):
|
||||
if False:
|
||||
# If you're seeing segfaults in tests, enable this.
|
||||
call_command('flush', verbosity=0, interactive=False,
|
||||
reset_sequences=False,
|
||||
allow_cascade=False,
|
||||
inhibit_post_migrate=False)
|
||||
|
||||
super(RegistrationCartTestCase, self).tearDown()
|
||||
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
|
||||
|
|
Loading…
Reference in a new issue