diff --git a/src/pEpmodule.cc b/src/pEpmodule.cc index b4d755c..17dd229 100644 --- a/src/pEpmodule.cc +++ b/src/pEpmodule.cc @@ -251,7 +251,7 @@ BOOST_PYTHON_MODULE(pEp) " flags 1 is force encryption\n" ) .def("decrypt", &Message::decrypt, - "msg2, keys, rating, consumed, flags = msg1.decrypt()\n" + "msg2, keys, rating, flags = msg1.decrypt()\n" "\n" "decrypts a p≡p message and returns a tuple with data\n" "\n" diff --git a/test/basic_doctest.py b/test/basic_doctest.py index ed62ceb..1df98ac 100644 --- a/test/basic_doctest.py +++ b/test/basic_doctest.py @@ -1,21 +1,31 @@ """ ->>> from pEp import * ->>> m = outgoing_message(Identity("vb@dingens.org", "23", "Volker Birk")) ->>> m.to = [Identity("trischa@dingens.org", "42", "Patricia Bednar")] ->>> m.shortmsg = "Hello" ->>> m.longmsg = "Something\\n" +>>> import pEp +>>> me = pEp.Identity("alice.smith@peptest.ch", "23", "Alice Smith") +>>> me.username +'Alice Smith' +>>> print(me) +Alice Smith +>>> you = pEp.Identity("bob.bourne@peptest.ch", "42", "Bob Bourne") +>>> print(you) +Bob Bourne +>>> m = pEp.outgoing_message(me) +>>> m.to = [you] +>>> m.shortmsg = "let's meet next week" +>>> m.longmsg = "Please call me back" >>> print(str(m).replace('\\r', '')) -From: Volker Birk -To: Patricia Bednar -Subject: Hello +From: Alice Smith +To: Bob Bourne +Subject: let's meet next week MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="msg.txt" -Something - ->>> +Please call me back +>>> m2 = m.encrypt() +>>> m3, keys, rating, flags = m2.decrypt() +>>> rating +6 """ if __name__ == "__main__":