2022-01-25 10:23:22 +00:00
|
|
|
import sure # noqa # pylint: disable=unused-import
|
|
|
|
|
|
|
|
from moto.ses.utils import is_valid_address
|
|
|
|
|
|
|
|
|
|
|
|
def test_is_valid_address():
|
|
|
|
valid, msg = is_valid_address("test@example.com")
|
2022-04-18 20:44:56 +00:00
|
|
|
valid.should.equal(True)
|
|
|
|
msg.should.equal(None)
|
2022-01-25 10:23:22 +00:00
|
|
|
|
|
|
|
valid, msg = is_valid_address("test@")
|
2022-04-18 20:44:56 +00:00
|
|
|
valid.should.equal(False)
|
2022-01-25 10:23:22 +00:00
|
|
|
msg.should.be.a(str)
|
|
|
|
|
|
|
|
valid, msg = is_valid_address("test")
|
2022-04-18 20:44:56 +00:00
|
|
|
valid.should.equal(False)
|
2022-01-25 10:23:22 +00:00
|
|
|
msg.should.be.a(str)
|