Commit 4fc19d52 authored by Ivan Tyagov's avatar Ivan Tyagov

Reduce copy / paste code.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33490 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c456eac1
...@@ -888,18 +888,10 @@ class TestIngestion(ERP5TypeTestCase): ...@@ -888,18 +888,10 @@ class TestIngestion(ERP5TypeTestCase):
self.setDiscoveryOrder(['user_login', 'file_name', 'content', 'input']) self.setDiscoveryOrder(['user_login', 'file_name', 'content', 'input'])
self.discoverMetadata() self.discoverMetadata()
self.checkMetadataOrder(expected_metadata) self.checkMetadataOrder(expected_metadata)
def stepReceiveEmailFromUnknown(self, sequence=None, sequence_list=None, **kw): def stepReceiveEmail(self, sequence=None, sequence_list=None, **kw):
""" """
email was sent in by someone who is not in the person_module Email was sent in by someone to ERP5.
"""
f = open(makeFilePath('email_from.txt'))
document = self.receiveEmail(data=f.read())
self.stepTic()
def stepReceiveEmailFromJohn(self, sequence=None, sequence_list=None, **kw):
"""
email was sent in by someone who is in the person_module
""" """
f = open(makeFilePath('email_from.txt')) f = open(makeFilePath('email_from.txt'))
document = self.receiveEmail(f.read()) document = self.receiveEmail(f.read())
...@@ -1283,9 +1275,12 @@ class TestIngestion(ERP5TypeTestCase): ...@@ -1283,9 +1275,12 @@ class TestIngestion(ERP5TypeTestCase):
if not run: return if not run: return
if not quiet: printAndLog('test_11_EmailIngestion') if not quiet: printAndLog('test_11_EmailIngestion')
step_list = [ 'stepCleanUp' step_list = [ 'stepCleanUp'
,'stepReceiveEmailFromUnknown' # unknown sender
,'stepReceiveEmail'
# create sender as Person object in ERP5
,'stepCreatePerson' ,'stepCreatePerson'
,'stepReceiveEmailFromJohn' # now a known sender
,'stepReceiveEmail'
,'stepVerifyEmailedDocuments' ,'stepVerifyEmailedDocuments'
] ]
self.playSequence(step_list, quiet) self.playSequence(step_list, quiet)
...@@ -1378,7 +1373,6 @@ class TestIngestion(ERP5TypeTestCase): ...@@ -1378,7 +1373,6 @@ class TestIngestion(ERP5TypeTestCase):
# Clear catalog # Clear catalog
portal_catalog = self.getCatalogTool() portal_catalog = self.getCatalogTool()
portal_catalog.manage_catalogClear() portal_catalog.manage_catalogClear()
# Reindex all # Reindex all
portal.ERP5Site_reindexAll() portal.ERP5Site_reindexAll()
self.stepTic() self.stepTic()
......
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