mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Removed unused local variables in tests.
This commit is contained in:
@@ -362,12 +362,12 @@ class SecurityLoggerTest(TestCase):
|
||||
|
||||
def test_suspicious_operation_creates_log_message(self):
|
||||
with patch_logger('django.security.SuspiciousOperation', 'error') as calls:
|
||||
response = self.client.get('/suspicious/')
|
||||
self.client.get('/suspicious/')
|
||||
self.assertEqual(len(calls), 1)
|
||||
self.assertEqual(calls[0], 'dubious')
|
||||
|
||||
def test_suspicious_operation_uses_sublogger(self):
|
||||
with patch_logger('django.security.DisallowedHost', 'error') as calls:
|
||||
response = self.client.get('/suspicious_spec/')
|
||||
self.client.get('/suspicious_spec/')
|
||||
self.assertEqual(len(calls), 1)
|
||||
self.assertEqual(calls[0], 'dubious')
|
||||
|
||||
Reference in New Issue
Block a user