diff --git a/acceptance/python/src/conftest.py b/acceptance/python/src/conftest.py index 70614c6..3a4912e 100644 --- a/acceptance/python/src/conftest.py +++ b/acceptance/python/src/conftest.py @@ -11,17 +11,15 @@ CONDITION_SCRIPT = """ Given that I have a 'string dictionary' named 'houses' inside 'asset' When I create the signature of 'houses' Then print the 'signature'""" - -FULFILL_SCRIPT = \ - """Scenario 'ecdh': Bob verifies the signature from Alice + +FULFILL_SCRIPT = """Scenario 'ecdh': Bob verifies the signature from Alice Given I have a 'ecdh public key' from 'Alice' Given that I have a 'string dictionary' named 'houses' inside 'asset' - Given I have a 'signature' named 'signature' inside 'result' + Given I have a 'signature' named 'signature' inside 'metadata' When I verify the 'houses' has a signature in 'signature' by 'Alice' Then print the string 'ok'""" - -SK_TO_PK = \ - """Scenario 'ecdh': Create the keypair + +SK_TO_PK = """Scenario 'ecdh': Create the keypair Given that I am known as '{}' Given I have the 'keyring' When I create the ecdh public key @@ -29,16 +27,13 @@ SK_TO_PK = \ Then print my 'ecdh public key' Then print my 'bitcoin address'""" -GENERATE_KEYPAIR = \ - """Scenario 'ecdh': Create the keypair +GENERATE_KEYPAIR = """Scenario 'ecdh': Create the keypair Given that I am known as 'Pippo' When I create the ecdh key When I create the bitcoin key Then print data""" -ZENROOM_DATA = { - 'also': 'more data' -} +ZENROOM_DATA = {"also": "more data"} HOUSE_ASSETS = { "data": { @@ -50,36 +45,39 @@ HOUSE_ASSETS = { { "name": "Draco", "team": "Slytherin", - } + }, ], } } -metadata = { - 'units': 300, - 'type': 'KG' -} +metadata = {"units": 300, "type": "KG"} + @pytest.fixture def gen_key_zencode(): return GENERATE_KEYPAIR + @pytest.fixture def secret_key_to_private_key_zencode(): return SK_TO_PK + @pytest.fixture def fulfill_script_zencode(): return FULFILL_SCRIPT + @pytest.fixture def condition_script_zencode(): return CONDITION_SCRIPT + @pytest.fixture def zenroom_house_assets(): return HOUSE_ASSETS + @pytest.fixture def zenroom_data(): return ZENROOM_DATA diff --git a/integration/python/src/conftest.py b/integration/python/src/conftest.py index 70614c6..3a4912e 100644 --- a/integration/python/src/conftest.py +++ b/integration/python/src/conftest.py @@ -11,17 +11,15 @@ CONDITION_SCRIPT = """ Given that I have a 'string dictionary' named 'houses' inside 'asset' When I create the signature of 'houses' Then print the 'signature'""" - -FULFILL_SCRIPT = \ - """Scenario 'ecdh': Bob verifies the signature from Alice + +FULFILL_SCRIPT = """Scenario 'ecdh': Bob verifies the signature from Alice Given I have a 'ecdh public key' from 'Alice' Given that I have a 'string dictionary' named 'houses' inside 'asset' - Given I have a 'signature' named 'signature' inside 'result' + Given I have a 'signature' named 'signature' inside 'metadata' When I verify the 'houses' has a signature in 'signature' by 'Alice' Then print the string 'ok'""" - -SK_TO_PK = \ - """Scenario 'ecdh': Create the keypair + +SK_TO_PK = """Scenario 'ecdh': Create the keypair Given that I am known as '{}' Given I have the 'keyring' When I create the ecdh public key @@ -29,16 +27,13 @@ SK_TO_PK = \ Then print my 'ecdh public key' Then print my 'bitcoin address'""" -GENERATE_KEYPAIR = \ - """Scenario 'ecdh': Create the keypair +GENERATE_KEYPAIR = """Scenario 'ecdh': Create the keypair Given that I am known as 'Pippo' When I create the ecdh key When I create the bitcoin key Then print data""" -ZENROOM_DATA = { - 'also': 'more data' -} +ZENROOM_DATA = {"also": "more data"} HOUSE_ASSETS = { "data": { @@ -50,36 +45,39 @@ HOUSE_ASSETS = { { "name": "Draco", "team": "Slytherin", - } + }, ], } } -metadata = { - 'units': 300, - 'type': 'KG' -} +metadata = {"units": 300, "type": "KG"} + @pytest.fixture def gen_key_zencode(): return GENERATE_KEYPAIR + @pytest.fixture def secret_key_to_private_key_zencode(): return SK_TO_PK + @pytest.fixture def fulfill_script_zencode(): return FULFILL_SCRIPT + @pytest.fixture def condition_script_zencode(): return CONDITION_SCRIPT + @pytest.fixture def zenroom_house_assets(): return HOUSE_ASSETS + @pytest.fixture def zenroom_data(): return ZENROOM_DATA diff --git a/planetmint/version.py b/planetmint/version.py index 8c2db61..fbf4a38 100644 --- a/planetmint/version.py +++ b/planetmint/version.py @@ -3,8 +3,8 @@ # SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0) # Code is Apache-2.0 and docs are CC-BY-4.0 -__version__ = '0.9.7' -__short_version__ = '0.9' +__version__ = "0.9.8" +__short_version__ = "0.9" # Supported Tendermint versions -__tm_supported_versions__ = ['0.34.15'] +__tm_supported_versions__ = ["0.34.15"] diff --git a/tests/assets/test_zenroom_signing.py b/tests/assets/test_zenroom_signing.py index 852b3c4..0a9dc8e 100644 --- a/tests/assets/test_zenroom_signing.py +++ b/tests/assets/test_zenroom_signing.py @@ -17,7 +17,7 @@ CONDITION_SCRIPT = """ FULFILL_SCRIPT = """Scenario 'ecdh': Bob verifies the signature from Alice Given I have a 'ecdh public key' from 'Alice' Given that I have a 'string dictionary' named 'houses' inside 'asset' - Given I have a 'signature' named 'signature' inside 'result' + Given I have a 'signature' named 'signature' inside 'metadata' When I verify the 'houses' has a signature in 'signature' by 'Alice' Then print the string 'ok'"""