Пример #1
0
def test_parse_msmtp_invalid_gmail():
    with Timeline().freeze(date(2014, 6, 27)):
        with raises(ValueError) as err:
            parse_msmtp('tests/data/sent.msmtp', False, None, True)
        assert 'not in gmail format' in str(err.value)
Пример #2
0
def test_missing_msmtp_log():
    with raises(IOError) as err:
        parse_msmtp('None')
    assert str(err.value) == "msmtp sent log ‘None’ not found"
Пример #3
0
def test_parse_msmtp(log, all_recipients, addresses, gmail, result):
    with Timeline().freeze(date(2014, 6, 27)):
        assert parse_msmtp(log, all_recipients, addresses, gmail) == result
Пример #4
0
def test_missing_msmtp_log():
    with expect.raises(IOError, "msmtp sent log 'None' not found"):
        parse_msmtp('None')