MCPcopy
hub / github.com/django/django / test_skip_checks

Method test_skip_checks

tests/admin_scripts/tests.py:1748–1768  ·  view source on GitHub ↗
(self, mocked_check, *mocked_objects)

Source from the content-addressed store, hash-verified

1746 @mock.patch("django.core.management.base.BaseCommand.check_migrations")
1747 @mock.patch("django.core.management.base.BaseCommand.check")
1748 def test_skip_checks(self, mocked_check, *mocked_objects):
1749 call_command(
1750 "runserver",
1751 use_reloader=False,
1752 skip_checks=True,
1753 stdout=self.output,
1754 )
1755 self.assertNotIn("Performing system checks...", self.output.getvalue())
1756 mocked_check.assert_not_called()
1757
1758 self.output.truncate(0)
1759 call_command(
1760 "runserver",
1761 use_reloader=False,
1762 skip_checks=False,
1763 stdout=self.output,
1764 )
1765 self.assertIn("Performing system checks...", self.output.getvalue())
1766 mocked_check.assert_has_calls(
1767 [mock.call(tags=set()), mock.call(display_num_errors=True)]
1768 )
1769
1770 def test_custom_system_checks(self):
1771 original_checks = registry.registered_checks.copy()

Callers

nothing calls this directly

Calls 3

call_commandFunction · 0.90
callMethod · 0.80
getvalueMethod · 0.45

Tested by

no test coverage detected