Last active
August 2, 2019 07:21
-
-
Save draganHR/0c97b9e4cb9488897fbe44adff67d87a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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