forked from pEp.foundation/pEpPythonAdapter
basic tests
parent
6873726518
commit
486f88cf48
|
@ -0,0 +1,23 @@
|
|||
"""
|
||||
>>> from pEp import *
|
||||
>>> m = outgoing_message(Identity("vb@dingens.org", "Volker Birk"))
|
||||
>>> m.to = [Identity("trischa@dingens.org", "Patricia Bednar")]
|
||||
>>> m.shortmsg = "Hello"
|
||||
>>> m.longmsg = "Something\\n"
|
||||
>>> print(str(m).replace('\\r', ''))
|
||||
From: Volker Birk <vb@dingens.org>
|
||||
To: Patricia Bednar <trischa@dingens.org>
|
||||
Subject: Hello
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
Content-Disposition: inline; filename="msg.txt"
|
||||
<BLANKLINE>
|
||||
Something
|
||||
<BLANKLINE>
|
||||
>>>
|
||||
"""
|
||||
|
||||
if __name__ == "__main__":
|
||||
import doctest
|
||||
doctest.testmod()
|
|
@ -19,3 +19,5 @@ class Handler(SyncMixIn):
|
|||
|
||||
handler = Handler()
|
||||
|
||||
# this is an interactive test, so start it with python -i
|
||||
|
||||
|
|
Loading…
Reference in New Issue