From efbf1f270e25ce3669b9b6f259da7b1cf62e29a5 Mon Sep 17 00:00:00 2001 From: heck Date: Mon, 27 Apr 2020 00:32:51 +0200 Subject: [PATCH] Test for key_mistrusted() --- test/pyadpt-57.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 test/pyadpt-57.py diff --git a/test/pyadpt-57.py b/test/pyadpt-57.py new file mode 100755 index 0000000..370d0a6 --- /dev/null +++ b/test/pyadpt-57.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# This test is related to jira issue PYADPT-57 - key_mistrusted +# When key_mistrusted on own key (that has a private), a key revocation is being performed +# So, this test just proves the revocation by showing fpr before and after key_mistrusted() + +""" +>>> alice = pEp.Identity("alice@peptest.org", "23") +>>> pEp.myself(alice) +>>> alice.fpr +>>> alice.key_mistrusted() +>>> pEp.myself(alice) +>>> alice.fpr +""" + +import pEp; + +if __name__ == "__main__": + import doctest + doctest.testmod()