def test_missing_api_key(settings):
settings.POSTMARK = {}
with pytest.raises(ImproperlyConfigured) as exc:
send_mail(**SEND_KWARGS)
assert str(exc.value) == 'You should specify TOKEN to use Postmark email backend'
评论列表
文章目录