import sure # noqa # pylint: disable=unused-import from moto.core.utils import convert_regex_to_flask_path def test_flask_path_converting_simple(): convert_regex_to_flask_path("/").should.equal("/") convert_regex_to_flask_path("/$").should.equal("/") convert_regex_to_flask_path("/foo").should.equal("/foo") convert_regex_to_flask_path("/foo/bar/").should.equal("/foo/bar/") def test_flask_path_converting_regex(): convert_regex_to_flask_path(r"/(?P[a-zA-Z0-9\-_]+)").should.equal( r'/' ) convert_regex_to_flask_path( r"(?P\d+)/(?P.*)$" ).should.equal(r'/')