From 63f77002b922d74afc76d5c9b6808f38ddf42b50 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 13 Mar 2021 03:40:22 +0100 Subject: [PATCH] python3Packages.ciscomobilityexpress: enable tests, add imports check --- .../ciscomobilityexpress/default.nix | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/ciscomobilityexpress/default.nix b/pkgs/development/python-modules/ciscomobilityexpress/default.nix index c48dffb534a3..d48ba03ad537 100644 --- a/pkgs/development/python-modules/ciscomobilityexpress/default.nix +++ b/pkgs/development/python-modules/ciscomobilityexpress/default.nix @@ -1,4 +1,9 @@ -{ buildPythonPackage, fetchPypi, lib, requests }: +{ lib +, buildPythonPackage +, fetchPypi +, requests +, python +}: buildPythonPackage rec { pname = "ciscomobilityexpress"; @@ -11,10 +16,19 @@ buildPythonPackage rec { propagatedBuildInputs = [ requests ]; - meta = { + # tests directory is set up, but has no tests + checkPhase = '' + ${python.interpreter} -m unittest + ''; + + pythonImportsCheck = [ + "ciscomobilityexpress" + ]; + + meta = with lib; { description = "Module to interact with Cisco Mobility Express APIs to fetch connected devices"; - homepage = "https://pypi.python.org/pypi/${pname}/"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ uvnikita ]; + homepage = "https://github.com/fbradyirl/ciscomobilityexpress"; + license = licenses.mit; + maintainers = with maintainers; [ uvnikita ]; }; }