diff options
Diffstat (limited to 'tests/logging_tests')
| -rw-r--r-- | tests/logging_tests/tests.py | 9 |
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) |
