forked from archive/andrewferrier_email2pdf
Add missing From/To header test for coverage.
This commit is contained in:
parent
9b2e293b34
commit
6604f6938d
1 changed files with 9 additions and 0 deletions
|
@ -19,6 +19,15 @@ class Direct_Basic(BaseTestClasses.Email2PDFTestCase):
|
|||
self.assertFalse(self.existsByTimeWarning())
|
||||
self.assertFalse(self.existsByTimeOriginal())
|
||||
|
||||
def test_missing_from_to(self):
|
||||
path = os.path.join(self.examineDir, "missing_from_to.pdf")
|
||||
self.addHeaders(frm=None, to=None)
|
||||
error = self.invokeDirectly(outputFile=path, extraParams=['--headers'])
|
||||
self.assertTrue(os.path.exists(path))
|
||||
self.assertEqual('', error)
|
||||
self.assertFalse(self.existsByTimeWarning())
|
||||
self.assertFalse(self.existsByTimeOriginal())
|
||||
|
||||
def test_internationalised_subject(self):
|
||||
path = os.path.join(self.examineDir, "internationalised_subject.pdf")
|
||||
self.addHeaders(subject=bytes("Hello!", 'iso-8859-1'), subject_encoding='iso-8859-1')
|
||||
|
|
Loading…
Add table
Reference in a new issue