summaryrefslogtreecommitdiff
path: root/tests/user_commands
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-11 05:36:40 +0100
committerGitHub <noreply@github.com>2023-01-11 05:36:40 +0100
commit829f4d1448f7b40238b47592fc17061bf77b0f23 (patch)
tree6b6128b885222c41d3314657532f2f1543757a0d /tests/user_commands
parentd4b4c1cae441230e5622163a42ef491588f2b868 (diff)
downloaddjango-829f4d1448f7b40238b47592fc17061bf77b0f23.tar.gz
Refs #31546, Refs #34118 -- Corrected CommandTests.test_requires_system_checks_specific().
System checks are never called without skip_checks=False. Moreover, called_once_with() is not a proper assertion and raise AttributeError on Python 3.12.
Diffstat (limited to 'tests/user_commands')
-rw-r--r--tests/user_commands/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/user_commands/tests.py b/tests/user_commands/tests.py
index b840ef8087..e40632385c 100644
--- a/tests/user_commands/tests.py
+++ b/tests/user_commands/tests.py
@@ -199,8 +199,8 @@ class CommandTests(SimpleTestCase):
with mock.patch(
"django.core.management.base.BaseCommand.check"
) as mocked_check:
- management.call_command("specific_system_checks")
- mocked_check.called_once_with(tags=[Tags.staticfiles, Tags.models])
+ management.call_command("specific_system_checks", skip_checks=False)
+ mocked_check.assert_called_once_with(tags=[Tags.staticfiles, Tags.models])
def test_requires_system_checks_invalid(self):
class Command(BaseCommand):