summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2013-11-09 12:11:58 +0100
committerClaude Paroz <claude@2xlibre.net>2013-11-09 12:11:58 +0100
commite6dd70b4dba3b7d812fecda7288c9707990ea71b (patch)
tree7dc29fbfd52ed35cdfc8a7f2b3265a9a456e9484 /tests
parent7e714827ead50f77aa82394cc2511ff96ab67fa4 (diff)
Fixed #21383 -- Added request details in SuspiciousOperation messages
Diffstat (limited to 'tests')
-rw-r--r--tests/logging_tests/tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/logging_tests/tests.py b/tests/logging_tests/tests.py
index 1b3a20cc24..1f9c8920c9 100644
--- a/tests/logging_tests/tests.py
+++ b/tests/logging_tests/tests.py
@@ -370,3 +370,12 @@ class SecurityLoggerTest(TestCase):
self.client.get('/suspicious_spec/')
self.assertEqual(len(calls), 1)
self.assertEqual(calls[0], 'dubious')
+
+ @override_settings(
+ ADMINS=(('admin', 'admin@example.com'),),
+ DEBUG=False,
+ )
+ def test_suspicious_email_admins(self):
+ self.client.get('/suspicious/')
+ self.assertEqual(len(mail.outbox), 1)
+ self.assertIn('path:/suspicious/,', mail.outbox[0].body)