From c882278f10f5d72535b3e08c89a3a2068ca706ef Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 23 Mar 2017 15:45:24 +0200 Subject: Handle non-ascii http bodies --- 100-mail.yarn | 4 ++-- 900-implements.yarn | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/100-mail.yarn b/100-mail.yarn index 5c64299..60e0be9 100644 --- a/100-mail.yarn +++ b/100-mail.yarn @@ -44,11 +44,11 @@ utility. Each password should be stored using a name AND mails for liw with subject $R get deleted GIVEN large random number R - WHEN someone sends mail to liw@liw.fi with subject $R + WHEN someone sends mail to liw-passthrough@liw.fi with subject $R THEN mailbox of liw has a mail with subject $R AND mails for liw with subject $R get deleted - WHEN someone sends mail to bugs@liw.fi with subject $R + WHEN someone sends mail to bugs-passthrough@liw.fi with subject $R THEN mailbox of distix has a mail with subject $R AND mailbox of liw has a mail with subject $R AND mails for distix with subject $R get deleted diff --git a/900-implements.yarn b/900-implements.yarn index 8a0c8db..7e6ef72 100644 --- a/900-implements.yarn +++ b/900-implements.yarn @@ -29,7 +29,7 @@ import re, sys, yarnhelper h = yarnhelper.YarnHelper() body = h.get_variable('http_body') - sys.stdout.write('Body:\n{}'.format(body)) + sys.stdout.write('Body:\n{}'.format(repr(body))) pattern = h.get_next_match() m = re.search(pattern, body) h.assertNotEqual(m, None) @@ -132,7 +132,7 @@ subject = h.get_variable(subject_key) print 'Wanted:', subject address = os.environ['ADDRESS'] - pass_name = 'server-yarns/imap/{}@{}'.format(user, address) + pass_name = 'pieni.net/{}'.format(user) pass_home = os.environ['PASS_HOME'] password = h.get_password_with_pass(pass_home, pass_name) got_it = False @@ -153,7 +153,7 @@ subject = h.get_variable(subject_key) print 'Wanted:', subject address = os.environ['ADDRESS'] - pass_name = 'server-yarns/imap/{}@{}'.format(user, address) + pass_name = 'pieni.net/{}'.format(user) pass_home = os.environ['PASS_HOME'] password = h.get_password_with_pass(pass_home, pass_name) def delete_matching(imapobj, msgid, msg): -- cgit v1.2.1