@pytest.mark.django_db
class TestClass():
def do_setup(self):
# do setup
def test_a(self):
# do something
def test_b(self):
# do something
test_a および test_b テスト ケースを実行する前に、do_setup() を呼び出す必要があります。私は pytest-django フレームワークを使用しています。
親切に助けてください。
前もって感謝します