From e07a072ced0e19bab984404d72384bffecf65919 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 12 May 2020 15:12:04 -0700 Subject: [PATCH] Adds test coverage report and fr-dev shortcuts --- fr-dev | 9 +++++++-- requirements.txt | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/fr-dev b/fr-dev index 74cc35956..e2f21a8b3 100755 --- a/fr-dev +++ b/fr-dev @@ -34,11 +34,16 @@ case "$1" in dbshell) docker-compose exec db psql -U fedireads fedireads ;; - restart_celery) docker-compose restart celery_worker ;; + test) + docker-compose exec web coverage run --source='.' manage.py test + ;; + test_report) + docker-compose exec web coverage report + ;; *) - echo "Unrecognised command. Try: up, initdb, resetdb,makemigrations, migrate, shell, dbshell,restart_celery" + echo "Unrecognised command. Try: up, initdb, resetdb,makemigrations, migrate, shell, dbshell, restart_celery, test, test_report" ;; esac diff --git a/requirements.txt b/requirements.txt index 13baa2257..8dd653e6f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ celery==4.4.2 +coverage=5.1 Django==3.0.3 django-model-utils==4.0.0 environs==7.2.0