Browse Source

PYADPT-54: Add codec for distribution protocol (keyreset) / adding test/codec_doctest.py

PYADPT-55
heck 2 years ago
parent
commit
73dd45c92e
1 changed files with 19 additions and 0 deletions
  1. +19
    -0
      test/codec_doctest.py

+ 19
- 0
test/codec_doctest.py View File

@ -0,0 +1,19 @@
"""
>>> import pEp
>>> def messageToSend(msg):
... m, keys, rating, flags = msg.decrypt()
... try:
... m.attachments[0].decode()
... print("decode successfull")
... except UnicodeDecodeError as e:
... print("decode failed")
>>> pEp.messageToSend = messageToSend
>>> pEp.key_reset_all_own_keys()
decode successfull
decode successfull
decode successfull
"""
if __name__ == "__main__":
import doctest
doctest.testmod()

Loading…
Cancel
Save