File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ def test_db_order(django_testdir):
34
34
35
35
django_testdir .create_test_module ('''
36
36
import pytest
37
+ from django.test import TestCase, TransactionTestCase
37
38
38
39
from .app.models import Item
39
40
@@ -50,14 +51,24 @@ def test_run_first_fixture(db):
50
51
@pytest.mark.django_db
51
52
def test_run_first_decorator():
52
53
pass
54
+
55
+ class MyTestCase(TestCase):
56
+ def test_run_first_test_case(self):
57
+ pass
58
+
59
+ class MyTransactionTestCase(TransactionTestCase):
60
+ def test_run_second_transaction_test_case(self):
61
+ pass
53
62
''' )
54
63
result = django_testdir .runpytest_subprocess ('-v' , '-s' )
55
64
assert result .ret == 0
56
65
result .stdout .fnmatch_lines ([
57
66
"*test_run_first_fixture*" ,
58
67
"*test_run_first_decorator*" ,
68
+ "*test_run_first_test_case*" ,
59
69
"*test_run_second_decorator*" ,
60
70
"*test_run_second_fixture*" ,
71
+ "*test_run_second_transaction_test_case*" ,
61
72
])
62
73
63
74
You can’t perform that action at this time.
0 commit comments