# -*- coding: utf-8 -*-
# @Time    : 2019/8/13 0013 20:59
# @Author  : Vincent
# @Email   : Vincent@163.com
# @File    : test_smtpsimple.py.py
# @Software: PyCharm

import pytest

@pytest.fixture
def smtp_connection():
    import smtplib
    return smtplib.SMTP("smtp.gmail.com", 587, timeout=5)

def test_ehlo(smtp_connection):
    response, msg = smtp_connection.ehlo()
    assert response == 250
    assert 0  # for demo purposes