Skip to content
Snippets Groups Projects
Commit 627a2be4 authored by Stuart D. Gathman's avatar Stuart D. Gathman Committed by GitHub
Browse files

Merge pull request #4 from yudai09/fix/support_test_chgfrom

suport chgfrom() in TestMilter
parents ea84943f 4c9c1680
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,8 @@ class TestBase(object):
self._bodyreplaced = False
## True if the %milter changed any headers.
self._headerschanged = False
## True if the %milter changed the envelope from.
self._envfromchanged = False
## Reply codes and messages set by the %milter
self._reply = None
## The rfc822 message object for the current email being fed to the %milter.
......@@ -60,6 +62,12 @@ class TestBase(object):
else:
raise IOError,"replacebody not called from eom()"
def chgfrom(self,sender,params=None):
if not self._body:
raise IOError,"chgheader not called from eom()"
self.log('chgfrom: sender=%s' % (sender))
self._envfromchanged = True
# FIXME: rfc822 indexing does not really reflect the way chg/add header
# work for a %milter
def chgheader(self,field,idx,value):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment