python3Packages.aiounifi: enable tests

This commit is contained in:
Fabian Affolter 2021-09-29 09:41:51 +02:00
parent 49fd2c26f6
commit b56d66f507

View File

@ -1,26 +1,44 @@
{ lib, buildPythonPackage, fetchPypi, isPy3k
, aiohttp }:
{ lib
, aiohttp
, aioresponses
, buildPythonPackage
, fetchFromGitHub
, pytest-aiohttp
, pytest-asyncio
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "aiounifi";
version = "27";
disabled = ! isPy3k;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-e84EwhyHxO7KHbWFzCiXw285q2baUkE7J25tED3Yt2o=";
src = fetchFromGitHub {
owner = "Kane610";
repo = pname;
rev = "v${version}";
sha256 = "09bxyfrwhqwlfxwgbbnkyd7md9wz05y3fjvc9f0rrj70z7qcicnv";
};
propagatedBuildInputs = [ aiohttp ];
propagatedBuildInputs = [
aiohttp
];
# upstream has no tests
doCheck = false;
checkInputs = [
aioresponses
pytest-aiohttp
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "aiounifi" ];
meta = with lib; {
description = "An asynchronous Python library for communicating with Unifi Controller API";
homepage = "https://pypi.python.org/pypi/aiounifi/";
license = licenses.mit;
description = "Python library for communicating with Unifi Controller API";
homepage = "https://github.com/Kane610/aiounifi";
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
};
}