lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

python311Packages.flask-restful: fix tests

Signals are now always available, since flask depends on blinker.

+26
+2
pkgs/development/python-modules/flask-restful/default.nix
··· 29 29 # conditional so that overrides are easier for web applications 30 30 patches = lib.optionals (lib.versionAtLeast werkzeug.version "2.1.0") [ 31 31 ./werkzeug-2.1.0-compat.patch 32 + ] ++ lib.optionals (lib.versionAtLeast flask.version "3.0.0") [ 33 + ./flask-3.0-compat.patch 32 34 ]; 33 35 34 36 propagatedBuildInputs = [
+24
pkgs/development/python-modules/flask-restful/flask-3.0-compat.patch
··· 1 + diff --git a/tests/test_api.py b/tests/test_api.py 2 + index 582ee5a..20db1f5 100644 3 + --- a/tests/test_api.py 4 + +++ b/tests/test_api.py 5 + @@ -1,7 +1,7 @@ 6 + import unittest 7 + import json 8 + from flask import Flask, Blueprint, redirect, views, abort as flask_abort 9 + -from flask.signals import got_request_exception, signals_available 10 + +from flask.signals import got_request_exception 11 + try: 12 + from mock import Mock 13 + except: 14 + @@ -491,10 +491,6 @@ class APITestCase(unittest.TestCase): 15 + self.assertEqual(api.default_mediatype, resp.headers['Content-Type']) 16 + 17 + def test_handle_error_signal(self): 18 + - if not signals_available: 19 + - # This test requires the blinker lib to run. 20 + - print("Can't test signals without signal support") 21 + - return 22 + app = Flask(__name__) 23 + api = flask_restful.Api(app) 24 +