now the doctest *really* works with the winapi.py.

git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2658 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
scrat 2008-05-31 13:48:47 +00:00
parent f1967e38eb
commit a9b8de7b21

View file

@ -35,7 +35,7 @@ class Attachments(list):
data = [] data = []
def __init__(self, params=[]): def __init__(self, params=[]):
for elem in params[0]: for elem in params:
fileitem = Attachment(filename=elem[0], ParentMail=elem[1]) fileitem = Attachment(filename=elem[0], ParentMail=elem[1])
self.data.append(fileitem) self.data.append(fileitem)
print "Attachment: ", fileitem.FileName print "Attachment: ", fileitem.FileName
@ -129,20 +129,19 @@ class Mail(object):
class Items(object): class Items(object):
self.temp = {} temp = {}
data = []
def __init__(self): def __init__(self):
self.data[0] = Mail(subj="Python Training", self.data.append(Mail(subj="Python Training",
sendName="Mark Pilgrim", sendName="Mark Pilgrim",
to="allPythonics@python.org", to="allPythonics@python.org",
body="The training will take place on Wed, 21st Dec.\ body="The training will take place on Wed, 21st Dec.\
Kindly check the enclosed invitation.", Kindly check the enclosed invitation.",
BodyFormat=1 BodyFormat=1
##Attachments=Attachments([("Invitation.pdf", self.data[0]), ("21.pdf", self.data[0])]) ))
)
self.data[0].addAttachment(Attachments=Attachments([("Invitation.pdf", self.data[0]), ("21.pdf", self.data[0])])) self.data[0].addAttachment(Attachments=Attachments([("Invitation.pdf", self.data[0]), ("21.pdf", self.data[0])]))
self.temp = self.data[0] self.data.append(Mail(subj="Information Technolgies Inc. Test it!",
self.data[1] = Mail(subj="Information Technolgies Inc. Test it!",
sendName="IT.org", sendName="IT.org",
to="allUser@internet.com", to="allUser@internet.com",
BodyFormat=2, BodyFormat=2,
@ -157,8 +156,8 @@ class Items(object):
</body>\ </body>\
</html>", </html>",
SentOn="21.04.07" SentOn="21.04.07"
) ))
self.data[2] = Mail(subj="@ Product Details @", self.data.append(Mail(subj="@ Product Details @",
sendName="", sendName="",
senderEmailAddress="custominfo@enterprise.com", senderEmailAddress="custominfo@enterprise.com",
to="recipient1@mail.com, customer@web.de", to="recipient1@mail.com, customer@web.de",
@ -168,7 +167,7 @@ class Items(object):
Please feel free to ask anytime you want.\ Please feel free to ask anytime you want.\
Sincerely, Customer Support", Sincerely, Customer Support",
SentOn="30.07.07" SentOn="30.07.07"
) ))
def Item(self, idx): def Item(self, idx):
return self.data[idx-1] return self.data[idx-1]