fixed sonarqube issues (#377)

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
This commit is contained in:
Lorenz Herzberger 2023-04-11 21:38:00 +02:00 committed by GitHub
parent 6a3c655e3b
commit 9f4cc292bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,26 +92,7 @@ def test_zenroom_validation(b):
tx["id"] = shared_creation_txid
from transactions.common.transaction import Transaction
from transactions.common.exceptions import (
SchemaValidationError,
ValidationError,
)
try:
print(f"TX\n{tx}")
tx_obj = Transaction.from_dict(tx, False)
except SchemaValidationError as e:
print(e)
assert ()
except ValidationError as e:
print(e)
assert ()
try:
b.validate_transaction(tx_obj)
except ValidationError as e:
print("Invalid transaction ({}): {}".format(type(e).__name__, e))
assert ()
print(f"VALIDATED : {tx_obj}")
assert (tx_obj == False) is False