Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save draganHR/0c97b9e4cb9488897fbe44adff67d87a to your computer and use it in GitHub Desktop.
Save draganHR/0c97b9e4cb9488897fbe44adff67d87a to your computer and use it in GitHub Desktop.
import pytest
from django.test import TestCase as django_case
class TestFoobarCase(object):
@pytest.fixture(scope="class", autouse=True)
def prepare_class(self, django_db_setup, django_db_blocker):
with django_db_blocker.unblock():
django_case.setUpClass()
# prepare database here...
yield
django_case.tearDownClass()
@pytest.fixture(scope="function", autouse=True)
def prepare_function(self):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment