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)
def test_missing_msmtp_log(): with raises(IOError) as err: parse_msmtp('None') assert str(err.value) == "msmtp sent log ‘None’ not found"
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
def test_missing_msmtp_log(): with expect.raises(IOError, "msmtp sent log 'None' not found"): parse_msmtp('None')