Mercurial > p > roundup > code
diff test/test_mailgw.py @ 5069:2706b66675bf
issue2550763 Strip whitespace from Multilink values after + or -.
Diagnosis, patch developed by W. Trevor King. Test heavily modified by
John Rouillard.
The goal is to make:
Subject: [issue23455] ... [ keyword =+ Foo,Foo Zot ; nosy =+ mary ]
act like:
Subject: [issue23455] ... [ keyword =+Foo,Foo Zot; nosy =+mary]
Without the patch " Foo" is not recognized.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 05 Jun 2016 20:48:07 -0400 |
| parents | a46d5d0fd5f8 |
| children | 786f0581bc90 |
line wrap: on
line diff
--- a/test/test_mailgw.py Sun Jun 05 10:54:08 2016 -0400 +++ b/test/test_mailgw.py Sun Jun 05 20:48:07 2016 -0400 @@ -3052,6 +3052,56 @@ _______________________________________________________________________ ''') + def testSpacesAroundMultilinkPropertyValue(self): + self.db.keyword.create(name='Foo') + self.db.keyword.create(name='Bar') + self.db.keyword.create(name='Baz This') + nodeid1 = self.doNewIssue() + nodeid2 = self._handle_mail('''Content-Type: text/plain; + charset="iso-8859-1" +From: "Bork, Chef" <chef@bork.bork.bork> +To: issue_tracker@your.tracker.email.domain.example +Message-Id: <followup_dummy_id> +In-Reply-To: <dummy_test_message_id> +Subject: [issue1] set keyword [ keyword =+ Foo,Baz This ; nosy =+ mary ] + +Set the Foo and Baz This keywords along with mary for nosy. +''') + assert os.path.exists(SENDMAILDEBUG) + self.compareMessages(self._get_mail(), +'''FROM: roundup-admin@your.tracker.email.domain.example +TO: mary@test.test, richard@test.test +Content-Type: text/plain; charset="utf-8" +Subject: [issue1] set keyword +To: mary@test.test, richard@test.test +From: "Bork, Chef" <issue_tracker@your.tracker.email.domain.example> +Reply-To: Roundup issue tracker + <issue_tracker@your.tracker.email.domain.example> +MIME-Version: 1.0 +Message-Id: <followup_dummy_id> +In-Reply-To: <dummy_test_message_id> +X-Roundup-Name: Roundup issue tracker +X-Roundup-Loop: hello +X-Roundup-Issue-Status: chatting +X-Roundup-Issue-keyword: Foo, Baz This +Content-Transfer-Encoding: quoted-printable + +Bork, Chef <chef@bork.bork.bork> added the comment: + +Set the Foo and Baz This keywords along with mary for nosy. + +---------- +keyword: +Baz This, Foo +nosy: +mary +status: unread -> chatting +title: Testing... -> set keyword + +_______________________________________________________________________ +Roundup issue tracker <issue_tracker@your.tracker.email.domain.example> +<http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1> +_______________________________________________________________________ +''') + def testOutlookAttachment(self): message = '''X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message
