[gnome-keysign: 2/16] test_latin1: fix wrong KeyPresentWidget argument



commit 0ac55c2ab74f66fcf3ce480ef30b1c2fa194c848
Author: RyuzakiKK <aasonykk gmail com>
Date:   Wed Dec 5 11:29:27 2018 +0100

    test_latin1: fix wrong KeyPresentWidget argument
    
    Also I took this opportunity to fix most of the PEP8 complains.

 tests/test_latin1.py | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/tests/test_latin1.py b/tests/test_latin1.py
index 8c8b360..97dee61 100644
--- a/tests/test_latin1.py
+++ b/tests/test_latin1.py
@@ -24,10 +24,12 @@ def get_fixture_dir(fixture=""):
     dname = os.path.join(thisdir, "fixtures", fixture)
     return dname
 
+
 def get_fixture_file(fixture):
     fname = os.path.join(get_fixture_dir(), fixture)
     return fname
 
+
 def read_fixture_file(fixture):
     fname = get_fixture_file(fixture)
     data = open(fname, 'rb').read()
@@ -39,10 +41,12 @@ def load_key(key):
     k = gpgmh.openpgpkey_from_data(f)
     return k
 
+
 def load_latin1_key():
     key = "seckey-latin1.asc"
     return load_key(key)
 
+
 def _gui_test(widget):
     widget.show_all()
     GLib.timeout_add_seconds(2,  Gtk.main_quit)
@@ -50,20 +54,22 @@ def _gui_test(widget):
 
 
 def test_kpw():
-    "We had problems with non-UTF-8 UIDs and KPW. We try to load one"
+    """We had problems with non-UTF-8 UIDs and KPW. We try to load one"""
     key = load_latin1_key()
     log.info("Loaded %r", key)
-    kpw = KeyPresentWidget(key=key, code="")
+    kpw = KeyPresentWidget(key=key, discovery_code="")
     _gui_test(kpw)
 
+
 def test_psw():
-    "We had problems with non UTF-8 UIDs and PSW. We try to load one"
+    """We had problems with non UTF-8 UIDs and PSW. We try to load one"""
     key = load_latin1_key()
     psw = PreSignWidget(key=key)
     _gui_test(psw)
 
+
 def test_klw():
-    "We had problems with non UTF-8 UIDs and KLW. We try to load one"
+    """We had problems with non UTF-8 UIDs and KLW. We try to load one"""
     key = load_latin1_key()
     klw = KeyListWidget(keys=[key])
     _gui_test(klw)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]