Commit 829e7868 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python311Packages.oauthenticator: refactor

- disable tests which require network access
parent bd5bb902
Loading
Loading
Loading
Loading
+18 −2
Original line number Diff line number Diff line
@@ -10,12 +10,13 @@
, pytest-asyncio
, pytestCheckHook
, requests-mock
, setuptools
}:

buildPythonPackage rec {
  pname = "oauthenticator";
  version = "16.2.1";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.7";

@@ -26,9 +27,13 @@ buildPythonPackage rec {

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace " --cov=oauthenticator" ""
      --replace-fail " --cov=oauthenticator" ""
  '';

  nativeBuildInputs = [
    setuptools
  ];

  propagatedBuildInputs = [
    jupyterhub
  ];
@@ -56,6 +61,16 @@ buildPythonPackage rec {
    # Tests are outdated, https://github.com/jupyterhub/oauthenticator/issues/432
    "test_azuread"
    "test_mediawiki"
    # Tests require network access
    "test_allowed"
    "test_auth0"
    "test_bitbucket"
    "test_cilogon"
    "test_github"
    "test_gitlab"
    "test_globus"
    "test_google"
    "test_openshift"
  ];

  pythonImportsCheck = [
@@ -67,5 +82,6 @@ buildPythonPackage rec {
    homepage =  "https://github.com/jupyterhub/oauthenticator";
    changelog = "https://github.com/jupyterhub/oauthenticator/blob/${version}/docs/source/reference/changelog.md";
    license = licenses.bsd3;
    maintainers = with maintainers; [ ];
  };
}