@@ -27,7 +27,7 @@ def test_get_fallback_account():
27
27
assert account .CHAIN == "SOL"
28
28
assert account .CURVE == "curve25519"
29
29
assert account ._signing_key .verify_key
30
- assert type (account .private_key ) == bytes
30
+ assert isinstance (account .private_key , bytes )
31
31
assert len (account .private_key ) == 32
32
32
33
33
@@ -42,12 +42,12 @@ async def test_SOLAccount(solana_account):
42
42
43
43
address = message ["sender" ]
44
44
assert address
45
- assert type (address ) == str
45
+ assert isinstance (address , str )
46
46
# assert len(address) == 44 # can also be 43?
47
47
signature = json .loads (message ["signature" ])
48
48
49
49
pubkey = base58 .b58decode (signature ["publicKey" ])
50
- assert type (pubkey ) == bytes
50
+ assert isinstance (pubkey , bytes )
51
51
assert len (pubkey ) == 32
52
52
53
53
verify_key = VerifyKey (pubkey )
@@ -61,7 +61,7 @@ async def test_SOLAccount(solana_account):
61
61
assert message ["sender" ] == signature ["publicKey" ]
62
62
63
63
pubkey = solana_account .get_public_key ()
64
- assert type (pubkey ) == str
64
+ assert isinstance (pubkey , str )
65
65
assert len (pubkey ) == 64
66
66
67
67
@@ -71,9 +71,9 @@ async def test_decrypt_curve25516(solana_account):
71
71
content = b"SomeContent"
72
72
73
73
encrypted = await solana_account .encrypt (content )
74
- assert type (encrypted ) == bytes
74
+ assert isinstance (encrypted , bytes )
75
75
decrypted = await solana_account .decrypt (encrypted )
76
- assert type (decrypted ) == bytes
76
+ assert isinstance (decrypted , bytes )
77
77
assert content == decrypted
78
78
79
79
@@ -90,7 +90,7 @@ async def test_verify_signature(solana_account):
90
90
await solana_account .sign_message (message )
91
91
assert message ["signature" ]
92
92
raw_signature = json .loads (message ["signature" ])["signature" ]
93
- assert type (raw_signature ) == str
93
+ assert isinstance (raw_signature , str )
94
94
95
95
verify_signature (raw_signature , message ["sender" ], get_verification_buffer (message ))
96
96
0 commit comments