mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #36252 -- Handled duplicate automatic imports in the shell command.
This commit is contained in:
@@ -303,11 +303,16 @@ class ShellCommandAutoImportsTestCase(SimpleTestCase):
|
||||
def test_message_with_stdout_listing_objects_with_isort_not_installed(self):
|
||||
class TestCommand(shell.Command):
|
||||
def get_auto_imports(self):
|
||||
# Include duplicate import strings to ensure proper handling,
|
||||
# independent of isort's deduplication (#36252).
|
||||
return super().get_auto_imports() + [
|
||||
"django.urls.reverse",
|
||||
"django.urls.resolve",
|
||||
"shell",
|
||||
"django",
|
||||
"django.urls.reverse",
|
||||
"shell",
|
||||
"django",
|
||||
]
|
||||
|
||||
with captured_stdout() as stdout:
|
||||
|
||||
Reference in New Issue
Block a user