fix: invalid escape sequence DeprecationWarning (#4430)
This commit is contained in:
parent
0953c11b92
commit
f50d80ede6
@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
from .responses import AthenaResponse
|
||||
|
||||
url_bases = ["https?://athena\.(.+)\.amazonaws\.com"]
|
||||
url_bases = [r"https?://athena\.(.+)\.amazonaws\.com"]
|
||||
|
||||
url_paths = {"{0}/$": AthenaResponse.dispatch}
|
||||
|
@ -561,9 +561,9 @@ def test_get_all_tags_value_filter_boto3():
|
||||
filter_by_value("some*value", [instance_a.id, instance_b.id, image.id])
|
||||
filter_by_value("*some*value", [instance_a.id, instance_b.id, image.id])
|
||||
filter_by_value("*some*value*", [instance_a.id, instance_b.id, image.id])
|
||||
filter_by_value("*value\*", [instance_c.id])
|
||||
filter_by_value("*value\*\*", [instance_d.id])
|
||||
filter_by_value("*value\*\?", [instance_e.id])
|
||||
filter_by_value(r"*value\*", [instance_c.id])
|
||||
filter_by_value(r"*value\*\*", [instance_d.id])
|
||||
filter_by_value(r"*value\*\?", [instance_e.id])
|
||||
|
||||
|
||||
# Has boto3 equivalent
|
||||
|
@ -10,8 +10,8 @@ from botocore.exceptions import ClientError
|
||||
from moto import mock_efs
|
||||
from tests.test_efs.junk_drawer import has_status_code
|
||||
|
||||
ARN_PATT = "^arn:(?P<Partition>[^:\n]*):(?P<Service>[^:\n]*):(?P<Region>[^:\n]*):(?P<AccountID>[^:\n]*):(?P<Ignore>(?P<ResourceType>[^:\/\n]*)[:\/])?(?P<Resource>.*)$"
|
||||
STRICT_ARN_PATT = "^arn:aws:[a-z]+:[a-z]{2}-[a-z]+-[0-9]:[0-9]+:[a-z-]+\/[a-z0-9-]+$"
|
||||
ARN_PATT = r"^arn:(?P<Partition>[^:\n]*):(?P<Service>[^:\n]*):(?P<Region>[^:\n]*):(?P<AccountID>[^:\n]*):(?P<Ignore>(?P<ResourceType>[^:\/\n]*)[:\/])?(?P<Resource>.*)$"
|
||||
STRICT_ARN_PATT = r"^arn:aws:[a-z]+:[a-z]{2}-[a-z]+-[0-9]:[0-9]+:[a-z-]+\/[a-z0-9-]+$"
|
||||
|
||||
SAMPLE_1_PARAMS = {
|
||||
"CreationToken": "myFileSystem1",
|
||||
|
@ -795,7 +795,7 @@ def test_set_default_policy_version():
|
||||
VersionId="wrong_version_id",
|
||||
).should.throw(
|
||||
ClientError,
|
||||
"Value 'wrong_version_id' at 'versionId' failed to satisfy constraint: Member must satisfy regular expression pattern: v[1-9][0-9]*(\.[A-Za-z0-9-]*)?",
|
||||
r"Value 'wrong_version_id' at 'versionId' failed to satisfy constraint: Member must satisfy regular expression pattern: v[1-9][0-9]*(\.[A-Za-z0-9-]*)?",
|
||||
)
|
||||
|
||||
# Set default version for non-existing version
|
||||
|
@ -25,7 +25,7 @@ def test_get_hls_streaming_session_url():
|
||||
endpoint_url=data_endpoint,
|
||||
)
|
||||
res = client.get_hls_streaming_session_url(StreamName=stream_name,)
|
||||
reg_exp = "^{}/hls/v1/getHLSMasterPlaylist.m3u8\?SessionToken\=.+$".format(
|
||||
reg_exp = r"^{}/hls/v1/getHLSMasterPlaylist.m3u8\?SessionToken\=.+$".format(
|
||||
data_endpoint
|
||||
)
|
||||
res.should.have.key("HLSStreamingSessionURL").which.should.match(reg_exp)
|
||||
@ -49,7 +49,9 @@ def test_get_dash_streaming_session_url():
|
||||
endpoint_url=data_endpoint,
|
||||
)
|
||||
res = client.get_dash_streaming_session_url(StreamName=stream_name,)
|
||||
reg_exp = "^{}/dash/v1/getDASHManifest.mpd\?SessionToken\=.+$".format(data_endpoint)
|
||||
reg_exp = r"^{}/dash/v1/getDASHManifest.mpd\?SessionToken\=.+$".format(
|
||||
data_endpoint
|
||||
)
|
||||
res.should.have.key("DASHStreamingSessionURL").which.should.match(reg_exp)
|
||||
|
||||
|
||||
|
@ -938,7 +938,7 @@ def test_create_invalid_cluster_subnet_group_boto3():
|
||||
)
|
||||
err = ex.value.response["Error"]
|
||||
err["Code"].should.equal("InvalidSubnet")
|
||||
err["Message"].should.match("Subnet \[[a-z0-9-']+\] not found.")
|
||||
err["Message"].should.match(r"Subnet \[[a-z0-9-']+\] not found.")
|
||||
|
||||
|
||||
# Has boto3 equivalent
|
||||
|
Loading…
Reference in New Issue
Block a user