Skip to content

Commit

Permalink
python3Packages.graphite-web: enable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
risicle authored and jsoo1 committed Jul 21, 2023
1 parent 7689550 commit 8c353ff
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pkgs/development/python-modules/graphite-web/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{ lib
, stdenv
, buildPythonPackage
, python
, cairocffi
, django
, django_tagging
, fetchFromGitHub
, fetchpatch
, gunicorn
, mock
, pyparsing
, python-memcached
, pythonOlder
Expand Down Expand Up @@ -73,6 +75,23 @@ buildPythonPackage rec {
--replace "join(WEBAPP_DIR, 'content')" "join('$out', 'webapp', 'content')"
'';

checkInputs = [ mock ];
checkPhase = ''
runHook preCheck
pushd webapp/
# avoid confusion with installed module
rm -r graphite
# redis not practical in test environment
substituteInPlace tests/test_tags.py \
--replace test_redis_tagdb _dont_test_redis_tagdb
DJANGO_SETTINGS_MODULE=tests.settings ${python.interpreter} manage.py test
popd
runHook postCheck
'';

pythonImportsCheck = [
"graphite"
];
Expand Down

0 comments on commit 8c353ff

Please sign in to comment.