capsul-flask/capsulflask
3wc 665e087bd4 Basic testing using flask-testing
This commit makes it possible to override settings during tests, by
switching capsulflask/__init__.py to a "create_app" pattern, and using
`dotenv_values` instead of `load_dotenv`.

The create_app() method returns a Flask app instance, to give
more control over when to initialise the app. This allows setting
environment variables in test files.

Then, use dotenv_values to override loaded .env variables with ones from
the environment, so that tests can set `POSTGRES_CONNECTION_PARAMETERS`
and `SPOKE_MODEL` (possibly others in future..).

Inital tests for the "landing" pages, and login / activation, are
included.
2021-07-17 10:38:04 +02:00
..
btcpay remove broken unneeded code from bitpay 2020-05-15 18:26:41 -05:00
schema_migrations add public_ipv4_first_usable_ip, public_ipv4_last_usable_ip 2021-07-12 14:38:56 -05:00
shell_scripts use the provided network_name when creating a capsul 2021-07-12 12:19:56 -05:00
static more managed ips work: cli sql improvements, added admin panel 2021-07-09 14:13:28 -05:00
templates more managed ips work: cli sql improvements, added admin panel 2021-07-09 14:13:28 -05:00
tests Basic testing using flask-testing 2021-07-17 10:38:04 +02:00
__init__.py Basic testing using flask-testing 2021-07-17 10:38:04 +02:00
admin.py add public_ipv4_first_usable_ip, public_ipv4_last_usable_ip 2021-07-12 14:38:56 -05:00
auth.py Basic testing using flask-testing 2021-07-17 10:38:04 +02:00
cli.py fix defaults for running locally and make email server not required. 2021-07-07 13:47:21 -05:00
console.py fixing capsul creation after I broke it with the pre-allocated IP 2021-07-11 12:18:58 -05:00
db.py add public_ipv4_first_usable_ip, public_ipv4_last_usable_ip 2021-07-12 14:38:56 -05:00
db_model.py add public_ipv4_first_usable_ip, public_ipv4_last_usable_ip 2021-07-12 14:38:56 -05:00
http_client.py missed a spot 2021-02-15 23:52:52 -06:00
hub_api.py move hardcoding public3 to the right place 2021-07-12 16:10:28 -05:00
hub_model.py fixing capsul creation after I broke it with the pre-allocated IP 2021-07-11 12:18:58 -05:00
landing.py add /about-ssh essay 2021-01-30 22:14:04 -06:00
metrics.py first crack at adding ssh host key display to the capsul detail page 2021-01-30 01:39:48 -06:00
payment.py fix syntax error and beeteeceepae2 warning formatting 2021-07-07 21:12:31 -05:00
shared.py first try at implementing the vm start and stop feature 2021-02-17 20:50:17 -06:00
spoke_api.py fixing capsul creation after I broke it with the pre-allocated IP 2021-07-11 12:18:58 -05:00
spoke_model.py fixing capsul creation after I broke it with the pre-allocated IP 2021-07-11 12:18:58 -05:00
tests_base.py Basic testing using flask-testing 2021-07-17 10:38:04 +02:00