Use escape sequence to express non-ASCII character
This commit is contained in:
parent
4eb921480e
commit
6120a60263
@ -88,7 +88,7 @@ class SecretsManagerBackend(BaseBackend):
|
||||
|
||||
if 'secret_string' not in secret_version and 'secret_binary' not in secret_version:
|
||||
raise ResourceNotFoundException(
|
||||
u"Secrets Manager can’t find the specified secret value for staging label: %s" %
|
||||
u"Secrets Manager can\u2019t find the specified secret value for staging label: %s" %
|
||||
(version_stage or u"AWSCURRENT")
|
||||
)
|
||||
|
||||
|
@ -43,7 +43,7 @@ def test_get_secret_that_does_not_exist():
|
||||
result = conn.get_secret_value(SecretId='i-dont-exist')
|
||||
|
||||
assert_equal(
|
||||
u"Secrets Manager can’t find the specified secret.",
|
||||
u"Secrets Manager can\u2019t find the specified secret.",
|
||||
cm.exception.response['Error']['Message']
|
||||
)
|
||||
|
||||
@ -58,10 +58,11 @@ def test_get_secret_that_does_not_match():
|
||||
result = conn.get_secret_value(SecretId='i-dont-match')
|
||||
|
||||
assert_equal(
|
||||
u"Secrets Manager can’t find the specified secret.",
|
||||
u"Secrets Manager can\u2019t find the specified secret.",
|
||||
cm.exception.response['Error']['Message']
|
||||
)
|
||||
|
||||
|
||||
@mock_secretsmanager
|
||||
def test_get_secret_value_that_is_marked_deleted():
|
||||
conn = boto3.client('secretsmanager', region_name='us-west-2')
|
||||
@ -85,7 +86,7 @@ def test_get_secret_that_has_no_value():
|
||||
result = conn.get_secret_value(SecretId='java-util-test-password')
|
||||
|
||||
assert_equal(
|
||||
u"Secrets Manager can’t find the specified secret value for staging label: AWSCURRENT",
|
||||
u"Secrets Manager can\u2019t find the specified secret value for staging label: AWSCURRENT",
|
||||
cm.exception.response['Error']['Message']
|
||||
)
|
||||
|
||||
|
@ -50,7 +50,7 @@ def test_get_secret_that_does_not_exist():
|
||||
"X-Amz-Target": "secretsmanager.GetSecretValue"},
|
||||
)
|
||||
json_data = json.loads(get_secret.data.decode("utf-8"))
|
||||
assert json_data['message'] == u"Secrets Manager can’t find the specified secret."
|
||||
assert json_data['message'] == u"Secrets Manager can\u2019t find the specified secret."
|
||||
assert json_data['__type'] == 'ResourceNotFoundException'
|
||||
|
||||
@mock_secretsmanager
|
||||
@ -71,7 +71,7 @@ def test_get_secret_that_does_not_match():
|
||||
"X-Amz-Target": "secretsmanager.GetSecretValue"},
|
||||
)
|
||||
json_data = json.loads(get_secret.data.decode("utf-8"))
|
||||
assert json_data['message'] == u"Secrets Manager can’t find the specified secret."
|
||||
assert json_data['message'] == u"Secrets Manager can\u2019t find the specified secret."
|
||||
assert json_data['__type'] == 'ResourceNotFoundException'
|
||||
|
||||
@mock_secretsmanager
|
||||
@ -91,7 +91,7 @@ def test_get_secret_that_has_no_value():
|
||||
)
|
||||
|
||||
json_data = json.loads(get_secret.data.decode("utf-8"))
|
||||
assert json_data['message'] == u"Secrets Manager can’t find the specified secret value for staging label: AWSCURRENT"
|
||||
assert json_data['message'] == u"Secrets Manager can\u2019t find the specified secret value for staging label: AWSCURRENT"
|
||||
assert json_data['__type'] == 'ResourceNotFoundException'
|
||||
|
||||
@mock_secretsmanager
|
||||
@ -179,7 +179,7 @@ def test_describe_secret_that_does_not_exist():
|
||||
)
|
||||
|
||||
json_data = json.loads(describe_secret.data.decode("utf-8"))
|
||||
assert json_data['message'] == u"Secrets Manager can’t find the specified secret."
|
||||
assert json_data['message'] == u"Secrets Manager can\u2019t find the specified secret."
|
||||
assert json_data['__type'] == 'ResourceNotFoundException'
|
||||
|
||||
@mock_secretsmanager
|
||||
@ -203,7 +203,7 @@ def test_describe_secret_that_does_not_match():
|
||||
)
|
||||
|
||||
json_data = json.loads(describe_secret.data.decode("utf-8"))
|
||||
assert json_data['message'] == u"Secrets Manager can’t find the specified secret."
|
||||
assert json_data['message'] == u"Secrets Manager can\u2019t find the specified secret."
|
||||
assert json_data['__type'] == 'ResourceNotFoundException'
|
||||
|
||||
@mock_secretsmanager
|
||||
@ -304,7 +304,7 @@ def test_rotate_secret_that_does_not_exist():
|
||||
)
|
||||
|
||||
json_data = json.loads(rotate_secret.data.decode("utf-8"))
|
||||
assert json_data['message'] == u"Secrets Manager can’t find the specified secret."
|
||||
assert json_data['message'] == u"Secrets Manager can\u2019t find the specified secret."
|
||||
assert json_data['__type'] == 'ResourceNotFoundException'
|
||||
|
||||
@mock_secretsmanager
|
||||
@ -328,7 +328,7 @@ def test_rotate_secret_that_does_not_match():
|
||||
)
|
||||
|
||||
json_data = json.loads(rotate_secret.data.decode("utf-8"))
|
||||
assert json_data['message'] == u"Secrets Manager can’t find the specified secret."
|
||||
assert json_data['message'] == u"Secrets Manager can\u2019t find the specified secret."
|
||||
assert json_data['__type'] == 'ResourceNotFoundException'
|
||||
|
||||
@mock_secretsmanager
|
||||
|
Loading…
x
Reference in New Issue
Block a user