def test_unimportable_sendable_email_raises_import_error():
with pytest.raises(ImportError):
with override_settings(SENDABLE_EMAILS=['boop']):
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')
评论列表
文章目录