python3Packages.django-rq: enable tests

This commit is contained in:
Martin Weinelt
2025-12-08 01:35:23 +01:00
parent f84be4d7b8
commit db182798e7
@@ -1,5 +1,6 @@
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
hatchling,
@@ -8,9 +9,9 @@
rq,
prometheus-client,
sentry-sdk,
psycopg,
pytest-django,
pytestCheckHook,
pyyaml,
redisTestHook,
}:
@@ -41,7 +42,20 @@ buildPythonPackage rec {
pythonImportsCheck = [ "django_rq" ];
doCheck = false; # require redis-server
# redis hook does not support darwin
doCheck = !stdenv.hostPlatform.isDarwin;
nativeCheckInputs = [
pytest-django
pytestCheckHook
pyyaml
redisTestHook
]
++ lib.concatAttrValues optional-dependencies;
preCheck = ''
export DJANGO_SETTINGS_MODULE=tests.settings
'';
meta = with lib; {
description = "Simple app that provides django integration for RQ (Redis Queue)";