@@ -19,78 +19,78 @@ async def test_invoke_sha3_512():
1919 result = await client .invoke (options )
2020 s = hashlib .sha512 ()
2121 s .update (b"hello polywrap!" )
22- assert result .result == s .digest ()
22+ assert result .unwrap () == s .digest ()
2323
2424@pytest .mark .skip (reason = "can't invoke sha3 wrapper due to an error related to wasmtime" )
2525async def test_invoke_sha3_384 ():
2626 options = InvokerOptions (uri = uri , method = "sha3_384" , args = args , encode_result = False )
2727 result = await client .invoke (options )
2828 s = hashlib .sha384 ()
2929 s .update (b"hello polywrap!" )
30- assert result .result == s .digest ()
30+ assert result .unwrap () == s .digest ()
3131
3232@pytest .mark .skip (reason = "can't invoke sha3 wrapper due to an error related to wasmtime" )
3333async def test_invoke_sha3_256 ():
3434 options = InvokerOptions (uri = uri , method = "sha3_256" , args = args , encode_result = False )
3535 result = await client .invoke (options )
3636 s = hashlib .sha256 ()
3737 s .update (b"hello polywrap!" )
38- assert result .result == s .digest ()
38+ assert result .unwrap () == s .digest ()
3939
4040@pytest .mark .skip (reason = "can't invoke sha3 wrapper due to an error related to wasmtime" )
4141async def test_invoke_sha3_224 ():
4242 options = InvokerOptions (uri = uri , method = "sha3_224" , args = args , encode_result = False )
4343 result = await client .invoke (options )
4444 s = hashlib .sha224 ()
4545 s .update (b"hello polywrap!" )
46- assert result .result == s .digest ()
46+ assert result .unwrap () == s .digest ()
4747
4848@pytest .mark .skip (reason = "can't invoke sha3 wrapper due to an error related to wasmtime" )
4949async def test_invoke_keccak_512 ():
5050 options = InvokerOptions (uri = uri , method = "keccak_512" , args = args , encode_result = False )
5151 result = await client .invoke (options )
5252 k = keccak .new (digest_bits = 512 )
5353 k .update (b'hello polywrap!' )
54- assert result .result == k .digest ()
54+ assert result .unwrap () == k .digest ()
5555
5656@pytest .mark .skip (reason = "can't invoke sha3 wrapper due to an error related to wasmtime" )
5757async def test_invoke_keccak_384 ():
5858 options = InvokerOptions (uri = uri , method = "keccak_384" , args = args , encode_result = False )
5959 result = await client .invoke (options )
6060 k = keccak .new (digest_bits = 384 )
6161 k .update (b'hello polywrap!' )
62- assert result .result == k .digest ()
62+ assert result .unwrap () == k .digest ()
6363
6464@pytest .mark .skip (reason = "can't invoke sha3 wrapper due to an error related to wasmtime" )
6565async def test_invoke_keccak_256 ():
6666 options = InvokerOptions (uri = uri , method = "keccak_256" , args = args , encode_result = False )
6767 result = await client .invoke (options )
6868 k = keccak .new (digest_bits = 256 )
6969 k .update (b'hello polywrap!' )
70- assert result .result == k .digest ()
70+ assert result .unwrap () == k .digest ()
7171
7272@pytest .mark .skip (reason = "can't invoke sha3 wrapper due to an error related to wasmtime" )
7373async def test_invoke_keccak_224 ():
7474 options = InvokerOptions (uri = uri , method = "keccak_224" , args = args , encode_result = False )
7575 result = await client .invoke (options )
7676 k = keccak .new (digest_bits = 224 )
7777 k .update (b'hello polywrap!' )
78- assert result .result == k .digest ()
78+ assert result .unwrap () == k .digest ()
7979
8080@pytest .mark .skip (reason = "can't invoke sha3 wrapper due to an error related to wasmtime" )
8181async def test_invoke_hex_keccak_256 ():
8282 options = InvokerOptions (uri = uri , method = "hex_keccak_256" , args = args , encode_result = False )
8383 result = await client .invoke (options )
8484 k = keccak .new (digest_bits = 256 )
8585 k .update (b'hello polywrap!' )
86- assert result .result == k .hexdigest ()
86+ assert result .unwrap () == k .hexdigest ()
8787
8888@pytest .mark .skip (reason = "buffer keccak must be implemented in python in order to assert" )
8989async def test_invoke_buffer_keccak_256 ():
9090 options = InvokerOptions (uri = uri , method = "buffer_keccak_256" , args = args , encode_result = False )
9191 result = await client .invoke (options )
9292 # TODO: Not sure exactly what this function `buffer_keccak_256` is doing in order to assert it properly
93- assert result .result == False
93+ assert result .unwrap () == False
9494
9595@pytest .mark .skip (reason = "can't invoke sha3 wrapper due to an error related to wasmtime" )
9696async def test_invoke_shake_256 ():
@@ -99,7 +99,7 @@ async def test_invoke_shake_256():
9999 result = await client .invoke (options )
100100 s = SHAKE256 .new ()
101101 s .update (b"hello polywrap!" )
102- assert result .result == s .read (8 ).hex ()
102+ assert result .unwrap () == s .read (8 ).hex ()
103103
104104@pytest .mark .skip (reason = "can't invoke sha3 wrapper due to an error related to wasmtime" )
105105async def test_invoke_shake_128 ():
@@ -108,4 +108,4 @@ async def test_invoke_shake_128():
108108 result = await client .invoke (options )
109109 s = SHAKE128 .new ()
110110 s .update (b"hello polywrap!" )
111- assert result .result == s .read (8 ).hex ()
111+ assert result .unwrap () == s .read (8 ).hex ()
0 commit comments