about summary refs log tree commit diff
path: root/pkgs/development/python-modules/httmock
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-07-07 16:40:06 +0200
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-07-07 10:25:04 -0700
commitab7068523804ac953849b2d8de7a6b4ee178a28f (patch)
treeb301ca083adb6bc3efa49e3c8d9e50fd497991bf /pkgs/development/python-modules/httmock
parentaddf2a6edf9a91464b5ab527b25dbdf18e36bcdd (diff)
python3Packages.httmock: enable tests
Diffstat (limited to 'pkgs/development/python-modules/httmock')
-rw-r--r--pkgs/development/python-modules/httmock/default.nix22
1 files changed, 17 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/httmock/default.nix b/pkgs/development/python-modules/httmock/default.nix
index 8976afaf852ea..7928189c7cd17 100644
--- a/pkgs/development/python-modules/httmock/default.nix
+++ b/pkgs/development/python-modules/httmock/default.nix
@@ -1,7 +1,12 @@
-{ lib, buildPythonPackage, fetchFromGitHub, requests }:
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, requests
+, pytestCheckHook
+}:
 
 buildPythonPackage rec {
-  pname   = "httmock";
+  pname = "httmock";
   version = "1.4.0";
 
   src = fetchFromGitHub {
@@ -11,12 +16,19 @@ buildPythonPackage rec {
     sha256 = "sha256-yid4vh1do0zqVzd1VV7gc+Du4VPrkeGFsDHqNbHL28I=";
   };
 
-  checkInputs = [ requests ];
+  checkInputs = [
+    requests
+    pytestCheckHook
+  ];
+
+  pytestFlagsArray = [ "tests.py" ];
+
+  pythonImportsCheck = [ "httmock" ];
 
   meta = with lib; {
     description = "A mocking library for requests";
-    homepage    = "https://github.com/patrys/httmock";
-    license     = licenses.asl20;
+    homepage = "https://github.com/patrys/httmock";
+    license = licenses.asl20;
     maintainers = with maintainers; [ nyanloutre ];
   };
 }