Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type hints for SimpleTestCase #2289

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions django-stubs/test/testcases.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class SimpleTestCase(unittest.TestCase):
client: Client
async_client_class: type[AsyncClient]
async_client: AsyncClient
allow_database_queries: bool
# TODO: str -> Literal['__all__']
databases: set[str] | str
def __call__(self, result: unittest.TestResult | None = ...) -> None: ...
Expand Down Expand Up @@ -131,7 +130,7 @@ class SimpleTestCase(unittest.TestCase):
count: int | None = ...,
) -> _AssertTemplateUsedContext | None: ...
def assertTemplateNotUsed(
self, response: HttpResponseBase | str = ..., template_name: str | None = ..., msg_prefix: str = ...
self, response: HttpResponseBase | str | None = ..., template_name: str | None = ..., msg_prefix: str = ...
) -> _AssertTemplateNotUsedContext | None: ...
def assertRaisesMessage(
self, expected_exception: type[Exception], expected_message: str, *args: Any, **kwargs: Any
Expand Down
2 changes: 0 additions & 2 deletions scripts/stubtest/allowlist_todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,6 @@ django.template.utils.EngineHandler.__init__
django.templatetags.i18n.BlockTranslateNode.__init__
django.templatetags.static.PrefixNode.__init__
django.templatetags.static.StaticNode.__init__
django.test.SimpleTestCase.assertTemplateNotUsed
django.test.runner.DiscoverRunner.log
django.test.runner.DiscoverRunner.reorder_by
django.test.runner.DummyList
Expand Down Expand Up @@ -1347,7 +1346,6 @@ django.test.selenium.SeleniumTestCaseBase.selenium_hub
django.test.testcases.LiveServerThread.__init__
django.test.testcases.LiveServerThread.server_class
django.test.testcases.SerializeMixin.tearDownClass
django.test.testcases.SimpleTestCase.assertTemplateNotUsed
django.test.testcases._AssertTemplateUsedContext.__init__
django.test.testcases._AssertTemplateUsedContext.message
django.urls.ResolverMatch.__iter__
Expand Down
Loading