fix node_handler tests
@@ -77,14 +77,16 @@ def test_node_handler_static_validation_fails(node_handler, node_request):
node_handler.static_validation(node_request)
-def test_node_handler_static_validation_passes(node_handler, node_request):
+def test_node_handler_static_validation_fail_dest_and_key(node_handler, node_request):
del node_request.operation['data'][BLS_KEY]
del node_request.operation['data'][BLS_KEY_PROOF]
+ with pytest.raises(InvalidClientRequest, match="Node's dest is not correct Ed25519 key"):
node_handler.static_validation(node_request)
node_request.operation['data'][BLS_KEY_PROOF] = randomString()
node_request.operation['data'][BLS_KEY] = randomString()
node_handler._verify_bls_key_proof_of_possession = lambda blskey_proof, blskey: True
+ with pytest.raises(InvalidClientRequest, match="Node's dest is not correct Ed25519 key"):
node_handler.static_validation(node_request)
