Answer the question
In order to leave comments, you need to log in
Why is data not visible in Pytest-django?
I have a test class of tests:
class TestClass:
@classmethod
def setup_class(cls):
cls.COUNT = 50
def test_equals(self):
assert self.COUNT == 50
@pytest.mark.django_db
class TestClass:
@pytest.mark.django_db
@classmethod
def setup_class(cls):
cls.COUNT = 50
def test_equals(self):
assert self.COUNT == 50
Answer the question
In order to leave comments, you need to log in
According to the docs , the method should not be called setup_class but setUp
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question