示例#1
0
def test_all_account_smtp_and_pop_able(accounts):
    for account in accounts:
        username = account[0]
        password = account[1]

        auto_generate_config = get_supported_server_info(username)

        # Ignore IMAP config.
        auto_generate_config = {
            k: v
            for k, v in auto_generate_config.items() if 'imap' not in k
        }

        auto_generate_config.update(username=username, password=password)

        server = MailServer(**auto_generate_config)

        assert server.smtp_able()
        assert server.pop_able()
示例#2
0
def test_smtp_able_and_pop_able(mail_server: MailServer):
    assert mail_server.smtp_able()
    assert mail_server.pop_able()