Skip to content

Commit dad51f6

Browse files
author
Fabien Coelho
committed
rework doc about env
1 parent a1edbcc commit dad51f6

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

docs/documentation.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,26 +38,28 @@ The package provides two fixtures:
3838
- `setAuth` to add authentication data to a request `kwargs` and `cookies`.
3939
This method is called automatically for adding credentials to a request.
4040

41-
- `ft_client` for app testing, which depends on the previous fixture, plus the
42-
`FLASK_TESTER_APP` environment variables which allow to find the application,
43-
which contains either:
41+
- `ft_client` for app testing, which depends on the previous fixture and
42+
is configured from two environment variables:
4443

45-
- The URL of the running application for external tests.
46-
The application is expected to be already running when the test is started.
44+
- `FLASK_TESTER_APP` tells where to find the application:
4745

48-
- The package (filename without `.py`) to be imported for the application.
49-
- for `pkg:name`, `name` is the application in `pkg`.
50-
- for `pkg` only, look for app as `app`, `application`, `create_app`, `make_app`.
51-
- in both cases, `name` is called if callable and not a Flask application.
46+
- The URL of the running application for external tests.
47+
The application is expected to be already running when the test is started.
48+
49+
- The package (filename without `.py`) to be imported for the application.
50+
- for `pkg:name`, `name` is the application in `pkg`.
51+
- for `pkg` only, look for app as `app`, `application`, `create_app`, `make_app`.
52+
- in both cases, `name` is called if callable and not a Flask application.
53+
54+
If not set, the default is `app`, which is to behave like Flask.
5255

53-
If not set, the default is `app`, which is to behave like Flask.
54-
55-
Moreover:
5656
- `FLASK_TESTER_DEFAULT` default login for authentication, default is _None_.
5757

5858
The fixture then provides test methods to issue test requests against a Flask application:
59+
5960
- `request` generic request with `login`, `auth`, `status` end `content` extensions.
6061
- `get post put patch delete` methods with the same extensions.
62+
6163
Moreover, `setPass`, `setToken` and `setCookie` are forwarded to the internal authenticator.
6264

6365
Authenticator environment variables can be set from the pytest Python test file by

docs/versions.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ Packages are distributed from [PyPI](https://pypi.org/project/FlaskTester/),
55
see also the [documentation](https://zx80.github.io/flask-tester/),
66
please report any [issues](https://github.com/zx80/flask-tester/issues).
77

8+
## ? on ?
9+
10+
Improved documentation.
11+
812
## 3.6 on 2024-03-30
913

1014
Only use `FLASK_TESTER_APP`, hide `FLASK_TESTER_URL`, which is only kept for

0 commit comments

Comments
 (0)