From d19bd261f443c6fe112da6cd6f34d0fae1828db4 Mon Sep 17 00:00:00 2001
From: matograine <tom.ngr@zaclys.net>
Date: Mon, 21 Sep 2020 20:45:35 +0200
Subject: [PATCH] [enh] #301 : make `membership` command display
 <pubkey:checksum> format

change the tests to match the new behavior
---
 silkaj/membership.py     | 3 ++-
 tests/test_membership.py | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/silkaj/membership.py b/silkaj/membership.py
index 2f7e1eee..d63002fa 100644
--- a/silkaj/membership.py
+++ b/silkaj/membership.py
@@ -31,6 +31,7 @@ from silkaj.network_tools import ClientInstance
 from silkaj.blockchain_tools import BlockchainParams, HeadBlock
 from silkaj.license import license_approval
 from silkaj.constants import SUCCESS_EXIT_STATUS
+from silkaj.tui import display_pubkey_and_checksum
 
 
 @click.command(
@@ -136,7 +137,7 @@ async def display_confirmation_table(identity_uid, pubkey, identity_timestamp):
         table.append(["Pending membership documents will expire", expiration])
 
     table.append(["User Identifier (UID)", identity_uid])
-    table.append(["Public Key", pubkey])
+    table.append(["Public Key", display_pubkey_and_checksum(pubkey)])
 
     table.append(["Block Identity", str(identity_timestamp)[:45] + "…"])
 
diff --git a/tests/test_membership.py b/tests/test_membership.py
index 52730310..62128235 100644
--- a/tests/test_membership.py
+++ b/tests/test_membership.py
@@ -37,6 +37,7 @@ from silkaj.constants import (
     SUCCESS_EXIT_STATUS,
     FAILURE_EXIT_STATUS,
 )
+from silkaj.tui import display_pubkey_and_checksum
 
 # AsyncMock available from Python 3.8. asynctest is used for Py < 3.8
 if sys.version_info[1] > 7:
@@ -213,7 +214,7 @@ async def test_display_confirmation_table(
         table.append(["Pending membership documents will expire", expiration])
 
     table.append(["User Identifier (UID)", identity_uid])
-    table.append(["Public Key", pubkey])
+    table.append(["Public Key", display_pubkey_and_checksum(pubkey)])
 
     table.append(["Block Identity", str(identity_timestamp)[:45] + "…"])
 
-- 
GitLab