Mercurial > p > roundup > code
comparison test/test_mailgw.py @ 5305:e20f472fde7d
issue2550799: provide basic support for handling html only emails
Initial implementation and testing with the dehtml html converter
done.
The use of beautifulsoup 4 is not tested. My test system breaks when
running dehtml.py using beautiful soup. I don't get the failures when
running under the test harness, but the text output is significantly
different (different line breaks, number of newlines etc.)
The tests for dehtml need to be generated for beautiful soup and the
expected output changed. Since I have a wonky install of beautiful
soup, I don't trust my output as the standard to test against. Also
since beautiful soup is optional, the test harness needs to skip the
beautifulsoup tests if import bs4 fails. Again something outside of my
expertise. I deleted the work I had done to implement that. I could
not get it working and wanted to get this feature in in some form.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Fri, 13 Oct 2017 21:46:59 -0400 |
| parents | 198b6e810c67 |
| children | a4fe76fba54a |
comparison
equal
deleted
inserted
replaced
| 5304:ae32f082e623 | 5305:e20f472fde7d |
|---|---|
| 289 self.assertEqual(self.db.issue.get(nodeid, 'tx_Source'), 'email') | 289 self.assertEqual(self.db.issue.get(nodeid, 'tx_Source'), 'email') |
| 290 | 290 |
| 291 | 291 |
| 292 class MailgwTestCase(MailgwTestAbstractBase, unittest.TestCase): | 292 class MailgwTestCase(MailgwTestAbstractBase, unittest.TestCase): |
| 293 | 293 |
| 294 def testTextHtmlMessage(self): | |
| 295 html_message='''Content-Type: text/html; | |
| 296 charset="iso-8859-1" | |
| 297 From: Chef <chef@bork.bork.bork> | |
| 298 To: issue_tracker@your.tracker.email.domain.example | |
| 299 Cc: richard@test.test | |
| 300 Reply-To: chef@bork.bork.bork | |
| 301 Message-Id: <dummy_test_message_id> | |
| 302 Subject: [issue] Testing... | |
| 303 | |
| 304 <body> | |
| 305 <script> | |
| 306 this must not be in output | |
| 307 </script> | |
| 308 <style> | |
| 309 p {display:block} | |
| 310 </style> | |
| 311 <div class="header"><h1>Roundup</h1> | |
| 312 <div id="searchbox" style="display: none"> | |
| 313 <form class="search" action="../search.html" method="get"> | |
| 314 <input type="text" name="q" size="18" /> | |
| 315 <input type="submit" value="Search" /> | |
| 316 <input type="hidden" name="check_keywords" value="yes" /> | |
| 317 <input type="hidden" name="area" value="default" /> | |
| 318 </form> | |
| 319 </div> | |
| 320 <script type="text/javascript">$('#searchbox').show(0);</script> | |
| 321 </div> | |
| 322 <ul class="current"> | |
| 323 <li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li> | |
| 324 <li class="toctree-l1"><a class="reference external" href="http://pypi.python.org/pypi/roundup">Download</a></li> | |
| 325 <li class="toctree-l1 current"><a class="reference internal" href="../docs.html">Docs</a><ul class="current"> | |
| 326 <li class="toctree-l2"><a class="reference internal" href="features.html">Roundup Features</a></li> | |
| 327 <li class="toctree-l2 current"><a class="current reference internal" href="">Installing Roundup</a></li> | |
| 328 <li class="toctree-l2"><a class="reference internal" href="upgrading.html">Upgrading to newer versions of Roundup</a></li> | |
| 329 <li class="toctree-l2"><a class="reference internal" href="FAQ.html">Roundup FAQ</a></li> | |
| 330 <li class="toctree-l2"><a class="reference internal" href="user_guide.html">User Guide</a></li> | |
| 331 <li class="toctree-l2"><a class="reference internal" href="customizing.html">Customising Roundup</a></li> | |
| 332 <li class="toctree-l2"><a class="reference internal" href="admin_guide.html">Administration Guide</a></li> | |
| 333 </ul> | |
| 334 <div class="section" id="prerequisites"> | |
| 335 <h2><a class="toc-backref" href="#id5">Prerequisites</a></h2> | |
| 336 <p>Roundup requires Python 2.6 or newer (but not Python 3) with a functioning | |
| 337 anydbm module. Download the latest version from <a class="reference external" href="http://www.python.org/">http://www.python.org/</a>. | |
| 338 It is highly recommended that users install the latest patch version | |
| 339 of python as these contain many fixes to serious bugs.</p> | |
| 340 <p>Some variants of Linux will need an additional “python dev” package | |
| 341 installed for Roundup installation to work. Debian and derivatives, are | |
| 342 known to require this.</p> | |
| 343 <p>If you’re on windows, you will either need to be using the ActiveState python | |
| 344 distribution (at <a class="reference external" href="http://www.activestate.com/Products/ActivePython/">http://www.activestate.com/Products/ActivePython/</a>), or you’ll | |
| 345 have to install the win32all package separately (get it from | |
| 346 <a class="reference external" href="http://starship.python.net/crew/mhammond/win32/">http://starship.python.net/crew/mhammond/win32/</a>).</p> | |
| 347 </div> | |
| 348 </body> | |
| 349 ''' | |
| 350 | |
| 351 self.db.config.MAILGW_CONVERT_HTMLTOTEXT = "dehtml" | |
| 352 nodeid = self._handle_mail(html_message) | |
| 353 assert not os.path.exists(SENDMAILDEBUG) | |
| 354 msgid = self.db.issue.get(nodeid, 'messages')[0] | |
| 355 self.assertEqual(self.db.msg.get(msgid, 'content'), '''Roundup\n Home\nDownload\nDocs\nRoundup Features\nInstalling Roundup\nUpgrading to newer versions of Roundup\nRoundup FAQ\nUser Guide\nCustomising Roundup\nAdministration Guide\nPrerequisites\n\nRoundup requires Python 2.6 or newer (but not Python 3) with a functioning\nanydbm module. Download the latest version from http://www.python.org/.\nIt is highly recommended that users install the latest patch version\nof python as these contain many fixes to serious bugs.\n\nSome variants of Linux will need an additional python dev package\ninstalled for Roundup installation to work. Debian and derivatives, are\nknown to require this.\n\nIf youre on windows, you will either need to be using the ActiveState python\ndistribution (at http://www.activestate.com/Products/ActivePython/), or youll\nhave to install the win32all package separately (get it from\nhttp://starship.python.net/crew/mhammond/win32/).''') | |
| 356 | |
| 357 self.db.config.MAILGW_CONVERT_HTMLTOTEXT = "none" | |
| 358 self.assertRaises(MailUsageError, self._handle_mail, html_message) | |
| 359 | |
| 294 def testMessageWithFromInIt(self): | 360 def testMessageWithFromInIt(self): |
| 295 nodeid = self._handle_mail('''Content-Type: text/plain; | 361 nodeid = self._handle_mail('''Content-Type: text/plain; |
| 296 charset="iso-8859-1" | 362 charset="iso-8859-1" |
| 297 From: Chef <chef@bork.bork.bork> | 363 From: Chef <chef@bork.bork.bork> |
| 298 To: issue_tracker@your.tracker.email.domain.example | 364 To: issue_tracker@your.tracker.email.domain.example |
| 1132 | 1198 |
| 1133 --090500050101020406060002-- | 1199 --090500050101020406060002-- |
| 1134 | 1200 |
| 1135 --utf-8-- | 1201 --utf-8-- |
| 1136 ''') | 1202 ''') |
| 1203 | |
| 1204 html_doc='''<html><body> | |
| 1205 <script> | |
| 1206 this must not be in output | |
| 1207 </script> | |
| 1208 <style> | |
| 1209 p {display:block} | |
| 1210 </style> | |
| 1211 <div class="header"><h1>Roundup</h1> | |
| 1212 <div id="searchbox" style="display: none"> | |
| 1213 <form class="search" action="../search.html" method="get"> | |
| 1214 <input type="text" name="q" size="18" /> | |
| 1215 <input type="submit" value="Search" /> | |
| 1216 <input type="hidden" name="check_keywords" value="yes" /> | |
| 1217 <input type="hidden" name="area" value="default" /> | |
| 1218 </form> | |
| 1219 </div> | |
| 1220 <script type="text/javascript">$('#searchbox').show(0);</script> | |
| 1221 </div> | |
| 1222 <ul class="current"> | |
| 1223 <li class="toctree-l1"><a class="reference internal" href="../index.html">Home</a></li> | |
| 1224 <li class="toctree-l1"><a class="reference external" href="http://pypi.python.org/pypi/roundup">Download</a></li> | |
| 1225 <li class="toctree-l1 current"><a class="reference internal" href="../docs.html">Docs</a><ul class="current"> | |
| 1226 <li class="toctree-l2"><a class="reference internal" href="features.html">Roundup Features</a></li> | |
| 1227 <li class="toctree-l2 current"><a class="current reference internal" href="">Installing Roundup</a></li> | |
| 1228 <li class="toctree-l2"><a class="reference internal" href="upgrading.html">Upgrading to newer versions of Roundup</a></li> | |
| 1229 <li class="toctree-l2"><a class="reference internal" href="FAQ.html">Roundup FAQ</a></li> | |
| 1230 <li class="toctree-l2"><a class="reference internal" href="user_guide.html">User Guide</a></li> | |
| 1231 <li class="toctree-l2"><a class="reference internal" href="customizing.html">Customising Roundup</a></li> | |
| 1232 <li class="toctree-l2"><a class="reference internal" href="admin_guide.html">Administration Guide</a></li> | |
| 1233 </ul> | |
| 1234 <div class="section" id="prerequisites"> | |
| 1235 <h2><a class="toc-backref" href="#id5">Prerequisites</a></h2> | |
| 1236 <p>Roundup requires Python 2.5 or newer (but not Python 3) with a functioning | |
| 1237 anydbm module. Download the latest version from <a class="reference external" href="http://www.python.org/">http://www.python.org/</a>. | |
| 1238 It is highly recommended that users install the latest patch version | |
| 1239 of python as these contain many fixes to serious bugs.</p> | |
| 1240 <p>Some variants of Linux will need an additional “python dev” package | |
| 1241 installed for Roundup installation to work. Debian and derivatives, are | |
| 1242 known to require this.</p> | |
| 1243 <p>If you’re on windows, you will either need to be using the ActiveState python | |
| 1244 distribution (at <a class="reference external" href="http://www.activestate.com/Products/ActivePython/">http://www.activestate.com/Products/ActivePython/</a>), or you’ll | |
| 1245 have to install the win32all package separately (get it from | |
| 1246 <a class="reference external" href="http://starship.python.net/crew/mhammond/win32/">http://starship.python.net/crew/mhammond/win32/</a>).</p> | |
| 1247 </div> | |
| 1248 umlaut =E4=F6=FC=C4=D6=DC=DF</body> | |
| 1249 </html> | |
| 1250 ''' | |
| 1251 # FIXME append =E4=F6=FC=C4=D6=DC=DF before </body> | |
| 1252 # to test quoted printable conversion | |
| 1253 | |
| 1254 multipart_msg_notext = '''From: mary <mary@test.test> | |
| 1255 To: issue_tracker@your.tracker.email.domain.example | |
| 1256 Message-Id: <followup_dummy_id> | |
| 1257 In-Reply-To: <dummy_test_message_id> | |
| 1258 Subject: [issue1] Testing... | |
| 1259 Content-Type: multipart/alternative; boundary=001485f339f8f361fb049188dbba | |
| 1260 | |
| 1261 | |
| 1262 --001485f339f8f361fb049188dbba | |
| 1263 Content-Type: text/csv; charset=ISO-8859-1 | |
| 1264 Content-Transfer-Encoding: quoted-printable | |
| 1265 | |
| 1266 75,23,16,18 | |
| 1267 | |
| 1268 --001485f339f8f361fb049188dbba | |
| 1269 Content-Type: text/html; charset=ISO-8859-1 | |
| 1270 Content-Transfer-Encoding: quoted-printable | |
| 1271 | |
| 1272 %s | |
| 1273 --001485f339f8f361fb049188dbba-- | |
| 1274 '''%html_doc | |
| 1275 | |
| 1276 def testMultipartTextifyHTML(self): | |
| 1277 mycontent='''Roundup\n Home\nDownload\nDocs\nRoundup Features\nInstalling Roundup\nUpgrading to newer versions of Roundup\nRoundup FAQ\nUser Guide\nCustomising Roundup\nAdministration Guide\nPrerequisites\n\nRoundup requires Python 2.5 or newer (but not Python 3) with a functioning\nanydbm module. Download the latest version from http://www.python.org/.\nIt is highly recommended that users install the latest patch version\nof python as these contain many fixes to serious bugs.\n\nSome variants of Linux will need an additional python dev package\ninstalled for Roundup installation to work. Debian and derivatives, are\nknown to require this.\n\nIf youre on windows, you will either need to be using the ActiveState python\ndistribution (at http://www.activestate.com/Products/ActivePython/), or youll\nhave to install the win32all package separately (get it from\nhttp://starship.python.net/crew/mhammond/win32/).\n\numlaut''' | |
| 1278 | |
| 1279 # \xc3\xa4\xc3\xb6\xc3\xbc\xc3\x84\xc3\x96\xc3\x9c\xc3\x9f | |
| 1280 # append above with leading space to end of mycontent. It is the | |
| 1281 # translated content when =E4=F6=FC=C4=D6=DC=DF is added to the html | |
| 1282 # input. | |
| 1283 self.doNewIssue() | |
| 1284 self.db.config.MAILGW_CONVERT_HTMLTOTEXT = 'dehtml' | |
| 1285 self._handle_mail(self.multipart_msg_notext) | |
| 1286 messages = self.db.issue.get('1', 'messages') | |
| 1287 messages.sort() | |
| 1288 msg = self.db.msg.getnode(messages[-1]) | |
| 1289 # html converted to utf-8 text | |
| 1290 self.assertEqual(msg.content, mycontent+" \xc3\xa4\xc3\xb6\xc3\xbc\xc3\x84\xc3\x96\xc3\x9c\xc3\x9f") | |
| 1291 self.assertEqual(msg.type, None) | |
| 1292 self.assertEqual(len(msg.files), 2) | |
| 1293 name = "unnamed" # no name for any files | |
| 1294 types = { 0: "text/csv", 1: "text/html" } | |
| 1295 # replace quoted printable string at end of html document | |
| 1296 # with it's utf-8 encoded equivalent so comparison | |
| 1297 # works. | |
| 1298 content = { 0: "75,23,16,18\n", 1: self.html_doc.replace(" =E4=F6=FC=C4=D6=DC=DF"," \xc3\xa4\xc3\xb6\xc3\xbc\xc3\x84\xc3\x96\xc3\x9c\xc3\x9f")} | |
| 1299 for n, id in enumerate (msg.files): | |
| 1300 f = self.db.file.getnode (id) | |
| 1301 self.assertEqual(f.name, name) | |
| 1302 self.assertEqual(f.type, types[n]) | |
| 1303 self.assertEqual(f.content, content[n]) | |
| 1304 | |
| 1305 self.compareMessages(self._get_mail(), | |
| 1306 '''From roundup-admin@your.tracker.email.domain.example Thu Oct 10 02:42:14 2017 | |
| 1307 FROM: roundup-admin@your.tracker.email.domain.example | |
| 1308 TO: chef@bork.bork.bork, richard@test.test | |
| 1309 Content-Type: multipart/mixed; boundary="===============6077820410007357357==" | |
| 1310 MIME-Version: 1.0 | |
| 1311 Reply-To: Roundup issue tracker | |
| 1312 <issue_tracker@your.tracker.email.domain.example> | |
| 1313 Message-Id: <followup_dummy_id> | |
| 1314 In-Reply-To: <dummy_test_message_id> | |
| 1315 X-Roundup-issue-status: chatting | |
| 1316 X-Roundup-issue-files: unnamed, unnamed | |
| 1317 Subject: [issue1] Testing... | |
| 1318 To: chef@bork.bork.bork, richard@test.test | |
| 1319 From: "Contrary, Mary" <issue_tracker@your.tracker.email.domain.example> | |
| 1320 Date: Thu, 12 Oct 2017 02:42:14 +0000 | |
| 1321 Precedence: bulk | |
| 1322 X-Roundup-Name: Roundup issue tracker | |
| 1323 X-Roundup-Loop: hello | |
| 1324 X-Roundup-Version: 1.5.1 | |
| 1325 | |
| 1326 --===============6077820410007357357== | |
| 1327 MIME-Version: 1.0 | |
| 1328 Content-Type: text/plain; charset="utf-8" | |
| 1329 Content-Transfer-Encoding: quoted-printable | |
| 1330 | |
| 1331 | |
| 1332 Contrary, Mary <mary@test.test> added the comment: | |
| 1333 | |
| 1334 Roundup | |
| 1335 Home | |
| 1336 Download | |
| 1337 Docs | |
| 1338 Roundup Features | |
| 1339 Installing Roundup | |
| 1340 Upgrading to newer versions of Roundup | |
| 1341 Roundup FAQ | |
| 1342 User Guide | |
| 1343 Customising Roundup | |
| 1344 Administration Guide | |
| 1345 Prerequisites | |
| 1346 | |
| 1347 Roundup requires Python 2.5 or newer (but not Python 3) with a functioning | |
| 1348 anydbm module. Download the latest version from http://www.python.org/. | |
| 1349 It is highly recommended that users install the latest patch version | |
| 1350 of python as these contain many fixes to serious bugs. | |
| 1351 | |
| 1352 Some variants of Linux will need an additional python dev package | |
| 1353 installed for Roundup installation to work. Debian and derivatives, are | |
| 1354 known to require this. | |
| 1355 | |
| 1356 If youre on windows, you will either need to be using the ActiveState python | |
| 1357 distribution (at http://www.activestate.com/Products/ActivePython/), or you= | |
| 1358 ll | |
| 1359 have to install the win32all package separately (get it from | |
| 1360 http://starship.python.net/crew/mhammond/win32/). | |
| 1361 | |
| 1362 umlaut =C3=A4=C3=B6=C3=BC=C3=84=C3=96=C3=9C=C3=9F | |
| 1363 | |
| 1364 ---------- | |
| 1365 status: unread -> chatting | |
| 1366 | |
| 1367 _______________________________________________________________________ | |
| 1368 Roundup issue tracker <issue_tracker@your.tracker.email.domain.example> | |
| 1369 <http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1> | |
| 1370 _______________________________________________________________________ | |
| 1371 --===============6077820410007357357== | |
| 1372 Content-Type: text/csv | |
| 1373 MIME-Version: 1.0 | |
| 1374 Content-Transfer-Encoding: base64 | |
| 1375 Content-Disposition: attachment; | |
| 1376 filename="unnamed" | |
| 1377 | |
| 1378 NzUsMjMsMTYsMTgK | |
| 1379 | |
| 1380 --===============6077820410007357357== | |
| 1381 Content-Type: text/html | |
| 1382 MIME-Version: 1.0 | |
| 1383 Content-Transfer-Encoding: base64 | |
| 1384 Content-Disposition: attachment; | |
| 1385 filename="unnamed" | |
| 1386 | |
| 1387 PGh0bWw+PGJvZHk+CjxzY3JpcHQ+CnRoaXMgbXVzdCBub3QgYmUgaW4gb3V0cHV0Cjwvc2NyaXB0 | |
| 1388 Pgo8c3R5bGU+CnAge2Rpc3BsYXk6YmxvY2t9Cjwvc3R5bGU+CiAgICA8ZGl2IGNsYXNzPSJoZWFk | |
| 1389 ZXIiPjxoMT5Sb3VuZHVwPC9oMT4KICAgICAgICA8ZGl2IGlkPSJzZWFyY2hib3giIHN0eWxlPSJk | |
| 1390 aXN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HdpbmRv | |
| 1428 d3MsIHlvdSB3aWxsIGVpdGhlciBuZWVkIHRvIGJlIHVzaW5nIHRoZSBBY3RpdmVTdGF0ZSBweXRo | |
| 1429 b24KZGlzdHJpYnV0aW9uIChhdCA8YSBjbGFzcz0icmVmZXJlbmNlIGV4dGVybmFsIiBocmVmPSJo | |
| 1430 dHRwOi8vd3d3LmFjdGl2ZXN0YXRlLmNvbS9Qcm9kdWN0cy9BY3RpdmVQeXRob24vIj5odHRwOi8v | |
| 1431 d3d3LmFjdGl2ZXN0YXRlLmNvbS9Qcm9kdWN0cy9BY3RpdmVQeXRob24vPC9hPiksIG9yIHlvdSYj | |
| 1432 ODIxNztsbApoYXZlIHRvIGluc3RhbGwgdGhlIHdpbjMyYWxsIHBhY2thZ2Ugc2VwYXJhdGVseSAo | |
| 1433 Z2V0IGl0IGZyb20KPGEgY2xhc3M9InJlZmVyZW5jZSBleHRlcm5hbCIgaHJlZj0iaHR0cDovL3N0 | |
| 1434 YXJzaGlwLnB5dGhvbi5uZXQvY3Jldy9taGFtbW9uZC93aW4zMi8iPmh0dHA6Ly9zdGFyc2hpcC5w | |
| 1435 eXRob24ubmV0L2NyZXcvbWhhbW1vbmQvd2luMzIvPC9hPikuPC9wPgo8L2Rpdj4KdW1sYXV0IMOk | |
| 1436 w7bDvMOEw5bDnMOfPC9ib2R5Pgo8L2h0bWw+Cg== | |
| 1437 | |
| 1438 --===============6077820410007357357==-- | |
| 1439 ''') | |
| 1440 | |
| 1137 | 1441 |
| 1138 def testMultipartRFC822Unpack(self): | 1442 def testMultipartRFC822Unpack(self): |
| 1139 self.doNewIssue() | 1443 self.doNewIssue() |
| 1140 self.db.config.MAILGW_UNPACK_RFC822 = True | 1444 self.db.config.MAILGW_UNPACK_RFC822 = True |
| 1141 self._handle_mail(self.multipart_msg_rfc822) | 1445 self._handle_mail(self.multipart_msg_rfc822) |
