capsul-flask/capsulflask
3wc ecc8f885fa 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-23 03:02:15 +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 Add custom themes, THEME setting, basic "yolocolo" theme (#7) 2021-07-22 01:15:39 +02:00
templates Merge pull request 'Disable BTCPay in the interface, if BTCPAY_PRIVATE_KEY is un-set' (#3) from optional-btcpay into master 2021-07-21 20:20:40 +02:00
tests Basic testing using flask-testing 2021-07-23 03:02:15 +02:00
theme/yolocolo Add custom themes, THEME setting, basic "yolocolo" theme (#7) 2021-07-22 01:15:39 +02:00
__init__.py Basic testing using flask-testing 2021-07-23 03:02:15 +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-23 03:02:15 +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 correctly enforce affordable_vm_sizes post form submission 2021-07-21 16:45:53 -05:00
db_model.py add public_ipv4_first_usable_ip, public_ipv4_last_usable_ip 2021-07-12 14:38:56 -05:00
db.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 Add VMs to the database even with HUB_MODE=mock (#6) 2021-07-21 23:26:10 +02:00
landing.py Auto-generate the pricing table from the database 2021-07-21 12:19:28 +02: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 define BTCPAY_ENABLED based on URL and btcpay key, pass it explicitly 2021-07-21 12:12:41 -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-23 03:02:15 +02:00