about summary refs log tree commit diff
path: root/pkgs/development/python-modules/aresponses
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-01-11 12:16:08 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2021-01-11 12:16:08 +0100
commit66a81b872f6866bfcb5b208c46db11609d095408 (patch)
tree0328de9e069f3daa764625f3db6edf760c2c175e /pkgs/development/python-modules/aresponses
parent9ecc4fccb52a86388bc0317369f530bd11a8f234 (diff)
python3Packages.aresponses: use GitHub as source and enable tests
Diffstat (limited to 'pkgs/development/python-modules/aresponses')
-rw-r--r--pkgs/development/python-modules/aresponses/default.nix34
1 files changed, 23 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/aresponses/default.nix b/pkgs/development/python-modules/aresponses/default.nix
index 7906a10cbe763..2407adefd5ceb 100644
--- a/pkgs/development/python-modules/aresponses/default.nix
+++ b/pkgs/development/python-modules/aresponses/default.nix
@@ -1,12 +1,11 @@
 { lib
-, buildPythonPackage
-, fetchPypi
-# propagatedBuildInputs
 , aiohttp
-# buildInputs
+, buildPythonPackage
+, fetchFromGitHub
+, isPy3k
 , pytest
 , pytest-asyncio
-, isPy3k
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
@@ -15,9 +14,11 @@ buildPythonPackage rec {
 
   disabled = !isPy3k;
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "1jn7x7ldqsz5cd190jqjil0kqyimd1d0yxfzzp41ky0p72lvd68a";
+  src = fetchFromGitHub {
+    owner = "CircleUp";
+    repo = pname;
+    rev = version;
+    sha256 = "0dc1y4s6kpmr0ar63kkyghvisgbmb8qq5wglmjclrpzd5180mjcl";
   };
 
   propagatedBuildInputs = [
@@ -29,13 +30,24 @@ buildPythonPackage rec {
     pytest-asyncio
   ];
 
-  # tests only distributed via git repository, not pypi
-  doCheck = false;
+  checkInputs = [
+    aiohttp
+    pytestCheckHook
+    pytest-asyncio
+  ];
+
+  # Disable tests which requires network access
+  disabledTests = [
+    "test_foo"
+    "test_passthrough"
+  ];
+
+  pythonImportsCheck = [ "aresponses" ];
 
   meta = with lib; {
     description = "Asyncio testing server";
     homepage = "https://github.com/circleup/aresponses";
     license = licenses.mit;
-    maintainers = [ maintainers.makefu ];
+    maintainers = with maintainers; [ makefu ];
   };
 }