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")
    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+}")
    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}")
    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)
    def test_single_path_param(self):
        path = "/{id}"

        flask_path = PathConverter.convert_path_to_flask(path)

        self.assertEqual(flask_path, "/<id>")
Exemplo n.º 6
0
    def test_single_path_param(self):
        path = "/<id>"

        flask_path = PathConverter.convert_path_to_api_gateway(path)

        self.assertEquals(flask_path, "/{id}")
    def test_proxy_path(self):
        path = "/<path:proxy>"

        flask_path = PathConverter.convert_path_to_api_gateway(path)

        self.assertEqual(flask_path, "/{proxy+}")
Exemplo n.º 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")
Exemplo n.º 9
0
    def test_proxy_path(self):
        path = "/{proxy+}"

        flask_path = PathConverter.convert_path_to_flask(path)

        self.assertEquals(flask_path, "/<path:proxy>")
Exemplo n.º 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}")
Exemplo n.º 11
0
    def test_single_path_param(self):
        path = "/{id}"

        flask_path = PathConverter.convert_path_to_flask(path)

        self.assertEquals(flask_path, "/<id>")
Exemplo n.º 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+}")
Exemplo n.º 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)
Exemplo n.º 14
0
    def test_proxy_path(self):
        path = "/<path:proxy>"

        flask_path = PathConverter.convert_path_to_api_gateway(path)

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