def test_punching_it(self): """Get a confirmation message back upon subscription request.""" c = client.say("punchit@localhost", "First message!", expect="punchit-confirm-[a-z0-9]+@localhost") assert not delivered("First message!"), "The subscription message was re-sent early!" client.say(c['from'], "Let's go!", expect="noreply@localhost") assert delivered("First message!"), "The subscription message wasn't re-sent!"
def test_backqueued_postings(self): state_storage.set('stardate.handlers', 'spock@localhost', 'LOG') reminder_storage.set('spock@localhost', datetime.date.today() - datetime.timedelta(days=5)) engage() assert delivered("Captain's Log"), "No reminder log delivered." assert queue().count() == 5, "%u backqueued reminders were delivered?" % queue().count()
def test_human_addressing(self): state_storage.set('stardate.handlers', 'spock@localhost', 'LOG') engage() message = delivered("Captain's Log") name, addr = email.utils.parseaddr(message['From']) assert name == "Stardate", "Reminder log isn't from 'Stardate'"
def test_first_posting(self): state_storage.set('stardate.handlers', 'spock@localhost', 'LOG') engage() assert delivered("Captain's Log"), "No reminder log delivered."