diff --git a/indy_node/test/pool_config/test_send_pool_config_only_trustee.py b/indy_node/test/pool_config/test_send_pool_config_only_trustee.py index 7c051de1d..b3128f54e 100644 --- a/indy_node/test/pool_config/test_send_pool_config_only_trustee.py +++ b/indy_node/test/pool_config/test_send_pool_config_only_trustee.py @@ -10,7 +10,7 @@ def test_only_trustee_send_pool_config_writes_true_force_false( sdk_wallet_steward = sdk_add_new_nym(looper, sdk_pool_handle, sdk_wallet_trustee, 'tmpname', STEWARD_STRING) req = sdk_pool_config_sent(looper, sdk_pool_handle, sdk_wallet_steward, poolConfigWTFF) - sdk_get_bad_response(looper, [req], RequestRejectedException, 'role is not accepted') + sdk_get_bad_response(looper, [req], RequestRejectedException, '{} can not do this action'.format(STEWARD_STRING)) def test_only_trustee_send_pool_config_writes_false_force_false( @@ -18,7 +18,7 @@ def test_only_trustee_send_pool_config_writes_false_force_false( sdk_wallet_steward = sdk_add_new_nym(looper, sdk_pool_handle, sdk_wallet_trustee, 'tmpname', STEWARD_STRING) req = sdk_pool_config_sent(looper, sdk_pool_handle, sdk_wallet_steward, poolConfigWFFF) - sdk_get_bad_response(looper, [req], RequestRejectedException, 'role is not accepted') + sdk_get_bad_response(looper, [req], RequestRejectedException, '{} can not do this action'.format(STEWARD_STRING)) def test_only_trustee_send_pool_config_writes_true_force_true( @@ -26,7 +26,7 @@ def test_only_trustee_send_pool_config_writes_true_force_true( sdk_wallet_steward = sdk_add_new_nym(looper, sdk_pool_handle, sdk_wallet_trustee, 'tmpname', STEWARD_STRING) req = sdk_pool_config_sent(looper, sdk_pool_handle, sdk_wallet_steward, poolConfigWTFT) - sdk_get_bad_response(looper, [req], RequestNackedException, 'role is not accepted') + sdk_get_bad_response(looper, [req], RequestNackedException, '{} can not do this action'.format(STEWARD_STRING)) def test_only_trustee_send_pool_config_writes_false_force_true( @@ -34,4 +34,4 @@ def test_only_trustee_send_pool_config_writes_false_force_true( sdk_wallet_steward = sdk_add_new_nym(looper, sdk_pool_handle, sdk_wallet_trustee, 'tmpname', STEWARD_STRING) req = sdk_pool_config_sent(looper, sdk_pool_handle, sdk_wallet_steward, poolConfigWFFT) - sdk_get_bad_response(looper, [req], RequestNackedException, 'role is not accepted') + sdk_get_bad_response(looper, [req], RequestNackedException, '{} can not do this action'.format(STEWARD_STRING)) diff --git a/indy_node/test/pool_restart/test_fail_pool_restart.py b/indy_node/test/pool_restart/test_fail_pool_restart.py index d55b7466e..5213165db 100644 --- a/indy_node/test/pool_restart/test_fail_pool_restart.py +++ b/indy_node/test/pool_restart/test_fail_pool_restart.py @@ -4,7 +4,7 @@ RequestNackedException from indy_common.constants import POOL_RESTART, ACTION, START, DATETIME -from plenum.common.constants import TXN_TYPE +from plenum.common.constants import TXN_TYPE, STEWARD_STRING from plenum.test.helper import sdk_gen_request, sdk_sign_and_submit_req_obj, \ sdk_get_reply, sdk_get_and_check_replies @@ -22,7 +22,7 @@ def test_fail_pool_restart_with_steward_role( req_obj) with pytest.raises(RequestRejectedException) as excinfo: sdk_get_and_check_replies(looper, [req], 100) - assert excinfo.match("role is not accepted") + assert excinfo.match('{} can not do this action'.format(STEWARD_STRING)) def test_fail_pool_restart_with_invalid_datetime( diff --git a/indy_node/test/validator_info/test_validator_info_command.py b/indy_node/test/validator_info/test_validator_info_command.py index b8cc1b12f..97785d41e 100644 --- a/indy_node/test/validator_info/test_validator_info_command.py +++ b/indy_node/test/validator_info/test_validator_info_command.py @@ -25,7 +25,7 @@ def test_fail_validator_info_command( sdk_get_validator_info(looper, sdk_wallet_client, sdk_pool_handle) - assert excinfo.match("There is no accepted constraint") + assert excinfo.match("Rule for this action is") def _comparison_reply(responses, req_obj): diff --git a/indy_node/test/write_permission/test_send_write_permission_no_client.py b/indy_node/test/write_permission/test_send_write_permission_no_client.py index e3bcaa743..cdda5e3c0 100644 --- a/indy_node/test/write_permission/test_send_write_permission_no_client.py +++ b/indy_node/test/write_permission/test_send_write_permission_no_client.py @@ -41,7 +41,7 @@ def test_client_cant_send_nym(looper, # client cant create another client NYM when ANYONE_CAN_WRITE set to False with pytest.raises(RequestRejectedException) as e: sdk_add_new_nym(looper, sdk_pool_handle, sdk_wallet_client) - e.match('There is no accepted constraint') + e.match('Rule for this action is') def test_client_can_send_attrib(looper, @@ -80,7 +80,7 @@ def test_client_cant_send_schema(looper, issuer_create_schema(identifier, "another_name", "2.0", json.dumps(["first", "last"]))) request = looper.loop.run_until_complete(build_schema_request(identifier, schema_json)) sdk_get_bad_response(looper, [sdk_sign_and_submit_req(sdk_pool_handle, sdk_wallet_client, request)], - RequestRejectedException, 'There is no accepted constraint') + RequestRejectedException, 'Rule for this action is') def test_client_cant_send_claim_def(looper, @@ -96,4 +96,4 @@ def test_client_cant_send_claim_def(looper, # Client cant send create if ANYONE_CAN_WRITE flag set to True req = sdk_sign_request_from_dict(looper, sdk_wallet_client, claim_def) req = sdk_send_signed_requests(sdk_pool_handle, [json.dumps(req)]) - sdk_get_bad_response(looper, req, RequestRejectedException, 'There is no accepted constraint') + sdk_get_bad_response(looper, req, RequestRejectedException, 'Rule for this action is')