diff --git a/dev.nix b/dev.nix index 969dfd24c..9e9b64629 100644 --- a/dev.nix +++ b/dev.nix @@ -1,7 +1,7 @@ with import { }; let dontCheckPython = drv: drv.overridePythonAttrs (old: { doCheck = false; }); - pythonPackages = python39Packages; + pythonPackages = python310Packages; harfbuzz_self = harfbuzz.override { withCoreText = true; }; ld_packages = [ @@ -75,5 +75,7 @@ pkgs.mkShell { glib libcxx cmake + + stripe-cli ] ++ (lib.optional stdenv.isDarwin pkgs.darwin.apple_sdk.frameworks.CoreText); } diff --git a/fragdenstaat_de/fds_donation/tests/test_stripe.py b/fragdenstaat_de/fds_donation/tests/test_stripe.py index 8add5b9c0..53dda3b05 100644 --- a/fragdenstaat_de/fds_donation/tests/test_stripe.py +++ b/fragdenstaat_de/fds_donation/tests/test_stripe.py @@ -100,6 +100,14 @@ def make_webhook_events(self, log: str): return [WebhookEvent(*m.groups()) for m in self.WH_EVENT_RE.finditer(log)] +@pytest.fixture(autouse=True) +def skip_stripe_if_no_key(request, settings): + if request.node.get_closest_marker("stripe"): + secret_key = settings.PAYMENT_VARIANTS["sepa"][1]["secret_key"] + if not secret_key: + pytest.skip("skipped stripe test because stripe key is not set") + + @pytest.fixture def stripe_sepa_setup(settings, live_server, monkeypatch): settings.SITE_URL = live_server.url