python311Packages.certauth: disable tests which requires network access

This commit is contained in:
Fabian Affolter 2023-10-17 10:28:50 +02:00
parent fe9c8fed9e
commit ad2ab5bd60

View File

@ -4,20 +4,29 @@
, pyopenssl
, tldextract
, pytestCheckHook
, pytest-cov
, pythonOlder
}:
buildPythonPackage rec {
pname = "certauth";
version = "1.3.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ikreymer";
repo = "certauth";
rev = "ad2bae5d40a9e45519fc1f2cd7678174bbc55b3d"; # Repo has no git tags
# Repo has no git tags, https://github.com/ikreymer/certauth/issues/15
rev = "ad2bae5d40a9e45519fc1f2cd7678174bbc55b3d";
hash = "sha256-Rso5N0jb9k7bdorjPIUMNiZZPnzwbkxFNiTpsJ9pco0=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "--cov certauth " ""
'';
propagatedBuildInputs = [
pyopenssl
tldextract
@ -25,10 +34,20 @@ buildPythonPackage rec {
nativeCheckInputs = [
pytestCheckHook
pytest-cov
];
pythonImportsCheck = [ "certauth" ];
pythonImportsCheck = [
"certauth"
];
disabledTests = [
# Tests want to download Public Suffix List
"test_file_wildcard"
"test_file_wildcard_subdomains"
"test_in_mem_parent_wildcard_cert"
"test_in_mem_parent_wildcard_cert_at_tld"
"test_in_mem_parent_wildcard_cert_2"
];
meta = with lib; {
description = "Simple CertificateAuthority and host certificate creation, useful for man-in-the-middle HTTPS proxy";