Unit tests for FastAPI branch

Run via `make test`
This commit is contained in:
Charles Hill 2021-11-17 10:53:32 -06:00
parent d8e4237961
commit 4e6c30a909
No known key found for this signature in database
GPG key ID: 8BA978937688DB3E
19 changed files with 344 additions and 46 deletions

View file

@ -1,3 +1,5 @@
.PHONY: test
all: format check requirements.txt
format: prettier black
@ -26,3 +28,10 @@ Pipfile.lock: Pipfile
requirements.txt: Pipfile.lock
cat Pipfile.lock | jq -r '.default | map_values(.version) | to_entries | map("\(.key)\(.value)") | join("\n")' > requirements.txt
test:
rm -rf ./tests/data
mkdir -p ./tests/data
LNBITS_DATA_FOLDER="./tests/data" \
PYTHONUNBUFFERED=1 \
./venv/bin/pytest -s