summaryrefslogtreecommitdiffhomepage
path: root/test/unit/applications/lang/python.py (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-12-14Python: Added "prefix" to configuration.OutOfFocus41-0/+1
This patch gives users the option to set a `"prefix"` attribute for Python applications, either at the top level or for specific `"target"`s. If the attribute is present, the value of `"prefix"` must be a string beginning with `"/"`. If the value of the `"prefix"` attribute is longer than 1 character and ends in `"/"`, the trailing `"/"` is stripped. The purpose of the `"prefix"` attribute is to set the `SCRIPT_NAME` context value for WSGI applications and the `root_path` context value for ASGI applications, allowing applications to properly route requests regardless of the path that the server uses to expose the application. The context value is only set if the request's URL path begins with the value of the `"prefix"` attribute. In all other cases, the `SCRIPT_NAME` or `root_path` values are not set. In addition, for WSGI applications, the value of `"prefix"` will be stripped from the beginning of the request's URL path before it is sent to the application. Reviewed-by: Andrei Zeliankou <zelenkov@nginx.com> Reviewed-by: Artem Konev <artem.konev@nginx.com> Signed-off-by: Alejandro Colomar <alx@nginx.com>
2021-11-02Tests: removed unused imports.Andrei Zeliankou1-1/+0
2021-07-29Application restart introduced.Max Romanov1-0/+1
When processing a restart request, the router sends a QUIT message to all existing processes of the application. Then, a new shared application port is created to ensure that new requests won't be handled by the old processes of the application.
2021-05-20Tests: Python targets.Oisin Canty1-2/+9
2020-12-06Tests: options moved to the separate class.Andrei Zeliankou1-1/+1
This change is necessary to separate the logic and prevent possible circular dependency.
2020-11-10Python: supporting ASGI legacy protocol.Max Romanov1-1/+2
Introducing manual protocol selection for 'universal' apps and frameworks.
2020-11-10Tests: supporting instant app parameters in load().Max Romanov1-9/+13
2020-10-28Tests: improving get_application_type() and fixing its name.Max Romanov1-6/+1
This patch also enables multiversion tests running for Java.
2020-10-19Tests: fixed unit.log print.Andrei Zeliankou1-1/+0
2020-10-07Tests: minor fixes.Andrei Zeliankou1-3/+3
2020-09-22Tests: introduced module name configuration.Max Romanov1-3/+10
Also fixed problem with "/" in application name.
2020-09-16Tests: migrated to the pytest.Andrei Zeliankou1-2/+10
2020-07-28Tests: style.Andrei Zeliankou1-1/+1
2020-05-28Tests: Added rootfs tests.Tiago Natel de Moura1-1/+18
2019-11-11Tests: added support for testing "user" and "group".Tiago Natel1-2/+3
2019-08-06Tests: rerun tests for each module version.Andrey Zelenkov1-1/+3
Rerun supported for Python, PHP, Perl, Ruby, and Java modules.
2019-04-26Tests: check application configuration loading.Andrey Zelenkov1-1/+1
2019-04-22Tests: using "pass" option instead of deprecated "application".Valentin Bartenev1-1/+1
2019-03-28Tests: unit module refactoring.Andrey Zelenkov1-0/+24