Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async def test_expn_smtputf8_not_supported(smtp_client, smtpd_server):
utf8_list = "tést-lïst"
async with smtp_client:
with pytest.raises(SMTPNotSupported):
await smtp_client.expn(utf8_list, options=["SMTPUTF8"])
async def test_vrfy_smtputf8_not_supported(smtp_client, smtpd_server):
async with smtp_client:
with pytest.raises(SMTPNotSupported):
await smtp_client.vrfy("tést@exåmple.com", options=["SMTPUTF8"])
async def test_send_message_smtputf8_not_supported(smtp_client, smtpd_server, message):
message["To"] = "reçipïént2@exåmple.com"
async with smtp_client:
with pytest.raises(SMTPNotSupported):
await smtp_client.send_message(message)
def test_raise_smtp_not_supported(message):
with pytest.raises(SMTPNotSupported) as excinfo:
raise SMTPNotSupported(message)
assert issubclass(excinfo.type, SMTPException)
assert excinfo.value.message == message
def test_raise_smtp_not_supported(message):
with pytest.raises(SMTPNotSupported) as excinfo:
raise SMTPNotSupported(message)
assert issubclass(excinfo.type, SMTPException)
assert excinfo.value.message == message