@@ -76,21 +76,21 @@ def test_sanity() -> None:
76
76
assert assertContains .__doc__
77
77
78
78
79
- def test_fixture_assert (django_testcase : django .test .TestCase ) -> None :
80
- django_testcase .assertEqual ("a" , "a" ) # noqa: PT009
79
+ def test_fixture_assert (djt : django .test .TestCase ) -> None :
80
+ djt .assertEqual ("a" , "a" ) # noqa: PT009
81
81
82
82
with pytest .raises (AssertionError ):
83
- django_testcase .assertXMLEqual ("a" * 10_000 , "a" )
83
+ djt .assertXMLEqual ("a" * 10_000 , "a" )
84
84
85
85
86
86
class TestInternalDjangoAssert :
87
- def test_fixture_assert (self , django_testcase : django .test .TestCase ) -> None :
88
- assert django_testcase != self
89
- django_testcase .assertEqual ("a" , "a" ) # noqa: PT009
87
+ def test_fixture_assert (self , djt : django .test .TestCase ) -> None :
88
+ assert djt != self
89
+ djt .assertEqual ("a" , "a" ) # noqa: PT009
90
90
assert not hasattr (self , "assertEqual" )
91
91
92
92
with pytest .raises (AssertionError ):
93
- django_testcase .assertXMLEqual ("a" * 10_000 , "a" )
93
+ djt .assertXMLEqual ("a" * 10_000 , "a" )
94
94
95
95
96
96
@pytest .mark .django_project (create_manage_py = True )
@@ -101,7 +101,7 @@ def test_django_test_case_assert(django_pytester: DjangoPytester) -> None:
101
101
import django.test
102
102
103
103
class TestDjangoAssert(django.test.TestCase):
104
- def test_fixture_assert(self, django_testcase : django.test.TestCase) -> None:
104
+ def test_fixture_assert(self, djt : django.test.TestCase) -> None:
105
105
assert False, "Cannot use the fixture"
106
106
107
107
def test_normal_assert(self) -> None:
@@ -112,7 +112,7 @@ def test_normal_assert(self) -> None:
112
112
)
113
113
result = django_pytester .runpytest_subprocess ()
114
114
result .assert_outcomes (failed = 1 , passed = 1 )
115
- assert "missing 1 required positional argument: 'django_testcase '" in result .stdout .str ()
115
+ assert "missing 1 required positional argument: 'djt '" in result .stdout .str ()
116
116
117
117
118
118
@pytest .mark .django_project (create_manage_py = True )
@@ -122,7 +122,7 @@ def test_unittest_assert(django_pytester: DjangoPytester) -> None:
122
122
import unittest
123
123
124
124
class TestUnittestAssert(unittest.TestCase):
125
- def test_fixture_assert(self, django_testcase : unittest.TestCase) -> None:
125
+ def test_fixture_assert(self, djt : unittest.TestCase) -> None:
126
126
assert False, "Cannot use the fixture"
127
127
128
128
def test_normal_assert(self) -> None:
@@ -131,4 +131,4 @@ def test_normal_assert(self) -> None:
131
131
)
132
132
result = django_pytester .runpytest_subprocess ()
133
133
result .assert_outcomes (failed = 1 , passed = 1 )
134
- assert "missing 1 required positional argument: 'django_testcase '" in result .stdout .str ()
134
+ assert "missing 1 required positional argument: 'djt '" in result .stdout .str ()
0 commit comments