Commit dffdf67b authored by Nicolas Wavrant's avatar Nicolas Wavrant

fixup! erp5_interface_post: first commit of test_exportAllExportableLetterPostInAPDFDocument

parent 9554d419
...@@ -219,6 +219,12 @@ class TestInterfacePost(ERP5TypeTestCase): ...@@ -219,6 +219,12 @@ class TestInterfacePost(ERP5TypeTestCase):
self.assertEqual(len(letter_post_list), len(sequence['letter_list'])) self.assertEqual(len(letter_post_list), len(sequence['letter_list']))
for letter_post in letter_post_list: for letter_post in letter_post_list:
self.assertEqual(letter_post.getSimulationState(), 'exportable') self.assertEqual(letter_post.getSimulationState(), 'exportable')
self.assertTrue(letter_post.hasData())
self.assertEqual(letter_post.getContentType(), 'application/pdf')
self.assertIn(
letter_post.getAggregateRelatedValue(),
sequence['letter_list']
)
def stepCheckAllLetterPostAreExported(self, sequence=None, sequence_list=None): def stepCheckAllLetterPostAreExported(self, sequence=None, sequence_list=None):
letter_post_list = self._portal_catalog( letter_post_list = self._portal_catalog(
...@@ -339,6 +345,12 @@ class TestInterfacePost(ERP5TypeTestCase): ...@@ -339,6 +345,12 @@ class TestInterfacePost(ERP5TypeTestCase):
def stepLaunchExportOnLetterPostModule(self, sequence=None, sequence_list=None): def stepLaunchExportOnLetterPostModule(self, sequence=None, sequence_list=None):
self.portal.letter_post_module.LetterPostModule_exportExportableLetterPostActivity(user_name=self.user.getUserId()) self.portal.letter_post_module.LetterPostModule_exportExportableLetterPostActivity(user_name=self.user.getUserId())
def stepCheckAggregatingPDFDocument(self, sequence=None, sequence_list=None):
pdf_document_list = self._portal_catalog(portal_type='PDF')
self.assertEqual(len(pdf_document_list), 1)
pdf_document, = pdf_document_list
self.assertEqual(2, int(pdf_document.getContentInformation()['Pages']))
def test_emailSendingIsPilotedByInternetMessagePost(self): def test_emailSendingIsPilotedByInternetMessagePost(self):
""" """
""" """
...@@ -414,12 +426,6 @@ class TestInterfacePost(ERP5TypeTestCase): ...@@ -414,12 +426,6 @@ class TestInterfacePost(ERP5TypeTestCase):
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
def stepCheckAggregatingPDFDocument(self, sequence=None, sequence_list=None):
pdf_document_list = self._portal_catalog(portal_type='PDF')
self.assertEqual(len(pdf_document_list), 1)
pdf_document, = pdf_document_list
self.assertEqual(2, int(pdf_document.getContentInformation()['Pages']))
def test_exportAllExportableLetterPostInAPDFDocument(self): def test_exportAllExportableLetterPostInAPDFDocument(self):
""" """
Test the action on Letter Post Module to export all exportable Letter Posts Test the action on Letter Post Module to export all exportable Letter Posts
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment