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
......@@ -889,17 +889,9 @@ class TestIngestion(ERP5TypeTestCase):
self.discoverMetadata()
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
"""
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
Email was sent in by someone to ERP5.
"""
f = open(makeFilePath('email_from.txt'))
document = self.receiveEmail(f.read())
......@@ -1283,9 +1275,12 @@ class TestIngestion(ERP5TypeTestCase):
if not run: return
if not quiet: printAndLog('test_11_EmailIngestion')
step_list = [ 'stepCleanUp'
,'stepReceiveEmailFromUnknown'
# unknown sender
,'stepReceiveEmail'
# create sender as Person object in ERP5
,'stepCreatePerson'
,'stepReceiveEmailFromJohn'
# now a known sender
,'stepReceiveEmail'
,'stepVerifyEmailedDocuments'
]
self.playSequence(step_list, quiet)
......@@ -1378,7 +1373,6 @@ class TestIngestion(ERP5TypeTestCase):
# Clear catalog
portal_catalog = self.getCatalogTool()
portal_catalog.manage_catalogClear()
# Reindex all
portal.ERP5Site_reindexAll()
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