-
-
Notifications
You must be signed in to change notification settings - Fork 14k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python311Packages.flask-restful: fix tests
Signals are now always available, since flask depends on blinker.
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
pkgs/development/python-modules/flask-restful/flask-3.0-compat.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
diff --git a/tests/test_api.py b/tests/test_api.py | ||
index 582ee5a..20db1f5 100644 | ||
--- a/tests/test_api.py | ||
+++ b/tests/test_api.py | ||
@@ -1,7 +1,7 @@ | ||
import unittest | ||
import json | ||
from flask import Flask, Blueprint, redirect, views, abort as flask_abort | ||
-from flask.signals import got_request_exception, signals_available | ||
+from flask.signals import got_request_exception | ||
try: | ||
from mock import Mock | ||
except: | ||
@@ -491,10 +491,6 @@ class APITestCase(unittest.TestCase): | ||
self.assertEqual(api.default_mediatype, resp.headers['Content-Type']) | ||
|
||
def test_handle_error_signal(self): | ||
- if not signals_available: | ||
- # This test requires the blinker lib to run. | ||
- print("Can't test signals without signal support") | ||
- return | ||
app = Flask(__name__) | ||
api = flask_restful.Api(app) | ||
|