def test_non_sendable_email_raises_improperly_configured_error():
with pytest.raises(ImproperlyConfigured):
with override_settings(SENDABLE_EMAILS=['unittest.TestCase']):
pass # pragma: no cover
# This is weird, but required for the next test to not explode.
# I think b/c the former exception was raised in a way that "broke"
# override_settings, preventing it from restoring the old value.
delattr(settings, 'SENDABLE_EMAILS')
评论列表
文章目录