From 87b3be26a0f471f59b70af9f25b314722c76c7c9 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Thu, 9 Jun 2022 11:48:32 -0400 Subject: [PATCH] Closes #9434: Enabled django-rich test runner for more user-friendly output --- base_requirements.txt | 6 +++++- docs/release-notes/version-3.3.md | 1 + netbox/netbox/settings.py | 2 ++ requirements.txt | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/base_requirements.txt b/base_requirements.txt index 6bb537a6a..10e8af3ba 100644 --- a/base_requirements.txt +++ b/base_requirements.txt @@ -30,10 +30,14 @@ django-pglocks # https://github.com/korfuri/django-prometheus django-prometheus -# Django chaching backend using Redis +# Django caching backend using Redis # https://github.com/jazzband/django-redis django-redis +# Django extensions for Rich (terminal text rendering) +# https://github.com/adamchainz/django-rich +django-rich + # Django integration for RQ (Reqis queuing) # https://github.com/rq/django-rq django-rq diff --git a/docs/release-notes/version-3.3.md b/docs/release-notes/version-3.3.md index 63fd9731f..514a92e88 100644 --- a/docs/release-notes/version-3.3.md +++ b/docs/release-notes/version-3.3.md @@ -19,6 +19,7 @@ ### Other Changes * [#9261](https://github.com/netbox-community/netbox/issues/9261) - `NetBoxTable` no longer automatically clears pre-existing calls to `prefetch_related()` on its queryset +* [#9434](https://github.com/netbox-community/netbox/issues/9434) - Enabled `django-rich` test runner for more user-friendly output ### REST API Changes diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index fd3730e2c..f9f4728a9 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -423,6 +423,8 @@ LOGIN_REDIRECT_URL = f'/{BASE_PATH}' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' +TEST_RUNNER = "django_rich.test.RichRunner" + # Exclude potentially sensitive models from wildcard view exemption. These may still be exempted # by specifying the model individually in the EXEMPT_VIEW_PERMISSIONS configuration parameter. EXEMPT_EXCLUDE_MODELS = ( diff --git a/requirements.txt b/requirements.txt index 293a33542..d6ea22e7d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,6 +7,7 @@ django-mptt==0.13.4 django-pglocks==1.0.4 django-prometheus==2.2.0 django-redis==5.2.0 +django-rich-1.4.0 django-rq==2.5.1 django-tables2==2.4.1 django-taggit==2.1.0