コード例 #1
0
    def test_no_changes_to_path(self):
        path = "/id/user"

        flask_path = PathConverter.convert_path_to_api_gateway(path)

        self.assertEqual(flask_path, "/id/user")
コード例 #2
0
    def test_proxy_with_path_param(self):
        path = "/id/<id>/user/<path:proxy>"

        flask_path = PathConverter.convert_path_to_api_gateway(path)

        self.assertEqual(flask_path, "/id/{id}/user/{proxy+}")
コード例 #3
0
    def test_multiple_path_params(self):
        path = "/id/<id>/user/<user>"

        flask_path = PathConverter.convert_path_to_api_gateway(path)

        self.assertEqual(flask_path, "/id/{id}/user/{user}")
コード例 #4
0
    def test_proxy_path_with_different_name(self, path, expected_result):
        flask_path = PathConverter.convert_path_to_api_gateway(path)

        self.assertEqual(flask_path, expected_result)
コード例 #5
0
    def test_single_path_param(self):
        path = "/{id}"

        flask_path = PathConverter.convert_path_to_flask(path)

        self.assertEqual(flask_path, "/<id>")
コード例 #6
0
    def test_single_path_param(self):
        path = "/<id>"

        flask_path = PathConverter.convert_path_to_api_gateway(path)

        self.assertEquals(flask_path, "/{id}")
コード例 #7
0
    def test_proxy_path(self):
        path = "/<path:proxy>"

        flask_path = PathConverter.convert_path_to_api_gateway(path)

        self.assertEqual(flask_path, "/{proxy+}")
コード例 #8
0
    def test_no_changes_to_path(self):
        path = "/id/user"

        flask_path = PathConverter.convert_path_to_api_gateway(path)

        self.assertEquals(flask_path, "/id/user")
コード例 #9
0
    def test_proxy_path(self):
        path = "/{proxy+}"

        flask_path = PathConverter.convert_path_to_flask(path)

        self.assertEquals(flask_path, "/<path:proxy>")
コード例 #10
0
    def test_multiple_path_params(self):
        path = "/id/<id>/user/<user>"

        flask_path = PathConverter.convert_path_to_api_gateway(path)

        self.assertEquals(flask_path, "/id/{id}/user/{user}")
コード例 #11
0
    def test_single_path_param(self):
        path = "/{id}"

        flask_path = PathConverter.convert_path_to_flask(path)

        self.assertEquals(flask_path, "/<id>")
コード例 #12
0
    def test_proxy_with_path_param(self):
        path = "/id/<id>/user/<path:proxy>"

        flask_path = PathConverter.convert_path_to_api_gateway(path)

        self.assertEquals(flask_path, "/id/{id}/user/{proxy+}")
コード例 #13
0
    def test_proxy_path_with_different_name(self, path, expected_result):
        flask_path = PathConverter.convert_path_to_api_gateway(path)

        self.assertEquals(flask_path, expected_result)
コード例 #14
0
    def test_proxy_path(self):
        path = "/<path:proxy>"

        flask_path = PathConverter.convert_path_to_api_gateway(path)

        self.assertEquals(flask_path, "/{proxy+}")