Fix deprecation warnings due to invalid escape sequences. (#3273)

* Fix deprecation warnings due to invalid escape sequences.

* Fix linter error.
This commit is contained in:
Karthikeyan Singaravelan 2020-09-10 13:50:26 +05:30 committed by GitHub
commit 7054143701
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 35 additions and 35 deletions

View file

@ -14,10 +14,10 @@ def test_flask_path_converting_simple():
def test_flask_path_converting_regex():
convert_regex_to_flask_path("/(?P<key_name>[a-zA-Z0-9\-_]+)").should.equal(
'/<regex("[a-zA-Z0-9\-_]+"):key_name>'
convert_regex_to_flask_path(r"/(?P<key_name>[a-zA-Z0-9\-_]+)").should.equal(
r'/<regex("[a-zA-Z0-9\-_]+"):key_name>'
)
convert_regex_to_flask_path("(?P<account_id>\d+)/(?P<queue_name>.*)$").should.equal(
'<regex("\d+"):account_id>/<regex(".*"):queue_name>'
)
convert_regex_to_flask_path(
r"(?P<account_id>\d+)/(?P<queue_name>.*)$"
).should.equal(r'<regex("\d+"):account_id>/<regex(".*"):queue_name>')