Skip to content

Commit 636daed

Browse files
authored
5.0: Update django.test.testcases (#2062)
* 5.0: Update `django.test.testcases` * 5.0: Update allowlist_todo.txt for `django.test.testcases`
1 parent 44ef7dc commit 636daed

File tree

2 files changed

+0
-37
lines changed

2 files changed

+0
-37
lines changed

django-stubs/test/testcases.pyi

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class _AssertTemplateUsedContext:
3535
test_case: SimpleTestCase
3636
template_name: str
3737
rendered_templates: list[Template]
38-
rendered_template_names: list[str]
3938
context: ContextList
4039
def __init__(self, test_case: Any, template_name: Any) -> None: ...
4140
def on_template_render(self, sender: Any, signal: Any, template: Any, context: Any, **kwargs: Any) -> None: ...
@@ -100,25 +99,14 @@ class SimpleTestCase(unittest.TestCase):
10099
msg_prefix: str = ...,
101100
html: bool = ...,
102101
) -> None: ...
103-
@overload
104102
def assertFormError(
105103
self,
106104
form: Form,
107105
field: str | None,
108106
errors: list[str] | str,
109107
msg_prefix: str = ...,
110108
) -> None: ...
111-
@overload
112-
def assertFormError( # old signature, deprecated in Django 4.1
113-
self,
114-
response: HttpResponseBase,
115-
form: str,
116-
field: str | None,
117-
errors: list[str] | str,
118-
msg_prefix: str = ...,
119-
) -> None: ...
120109
# assertFormsetError (lowercase "set") deprecated in Django 4.2
121-
@overload
122110
def assertFormsetError(
123111
self,
124112
formset: BaseFormSet,
@@ -127,17 +115,6 @@ class SimpleTestCase(unittest.TestCase):
127115
errors: list[str] | str,
128116
msg_prefix: str = ...,
129117
) -> None: ...
130-
@overload
131-
def assertFormsetError( # old signature, deprecated in Django 4.1
132-
self,
133-
response: HttpResponseBase,
134-
formset: str,
135-
form_index: int | None,
136-
field: str | None,
137-
errors: list[str] | str,
138-
msg_prefix: str = ...,
139-
) -> None: ...
140-
@overload
141118
def assertFormSetError(
142119
self,
143120
formset: BaseFormSet,
@@ -146,16 +123,6 @@ class SimpleTestCase(unittest.TestCase):
146123
errors: list[str] | str,
147124
msg_prefix: str = ...,
148125
) -> None: ...
149-
@overload
150-
def assertFormSetError(
151-
self,
152-
response: HttpResponseBase,
153-
formset: str,
154-
form_index: int | None,
155-
field: str | None,
156-
errors: list[str] | str,
157-
msg_prefix: str = ...,
158-
) -> None: ...
159126
def assertTemplateUsed(
160127
self,
161128
response: HttpResponseBase | str | None = ...,

scripts/stubtest/allowlist_todo.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,8 +1566,6 @@ django.template.utils.EngineHandler.__init__
15661566
django.templatetags.i18n.BlockTranslateNode.__init__
15671567
django.templatetags.static.PrefixNode.__init__
15681568
django.templatetags.static.StaticNode.__init__
1569-
django.test.SimpleTestCase.assertFormError
1570-
django.test.SimpleTestCase.assertFormSetError
15711569
django.test.SimpleTestCase.assertTemplateNotUsed
15721570
django.test.runner.DiscoverRunner.log
15731571
django.test.runner.DiscoverRunner.reorder_by
@@ -1607,8 +1605,6 @@ django.test.selenium.SeleniumTestCaseBase.selenium_hub
16071605
django.test.testcases.LiveServerThread.__init__
16081606
django.test.testcases.LiveServerThread.server_class
16091607
django.test.testcases.SerializeMixin.tearDownClass
1610-
django.test.testcases.SimpleTestCase.assertFormError
1611-
django.test.testcases.SimpleTestCase.assertFormSetError
16121608
django.test.testcases.SimpleTestCase.assertTemplateNotUsed
16131609
django.test.testcases._AssertTemplateUsedContext.__init__
16141610
django.test.testcases._AssertTemplateUsedContext.message

0 commit comments

Comments
 (0)