Blame SOURCES/e64b95848f3253157d831f4934841fceeaf9b2e3.patch
|
|
97147d |
From e64b95848f3253157d831f4934841fceeaf9b2e3 Mon Sep 17 00:00:00 2001
|
|
|
97147d |
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
|
|
97147d |
Date: Thu, 14 Nov 2019 12:54:47 +0100
|
|
|
97147d |
Subject: [PATCH] Test instance type by isinstance, not issubclass
|
|
|
97147d |
|
|
|
97147d |
Fixes https://github.com/aio-libs/aiohttp-cors/issues/277
|
|
|
97147d |
---
|
|
|
97147d |
tests/unit/test_cors_config.py | 2 +-
|
|
|
97147d |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
97147d |
|
|
|
97147d |
diff --git a/tests/unit/test_cors_config.py b/tests/unit/test_cors_config.py
|
|
|
97147d |
index 817410e..d494e20 100644
|
|
|
97147d |
--- a/tests/unit/test_cors_config.py
|
|
|
97147d |
+++ b/tests/unit/test_cors_config.py
|
|
|
97147d |
@@ -103,7 +103,7 @@ def test_static_resource(app, cors):
|
|
|
97147d |
"/file", "/", name="dynamic_named_route")
|
|
|
97147d |
assert len(app.router.keys()) == 1
|
|
|
97147d |
for resource in list(app.router.resources()):
|
|
|
97147d |
- if issubclass(resource, web.StaticResource):
|
|
|
97147d |
+ if isinstance(resource, web.StaticResource):
|
|
|
97147d |
cors.add(resource)
|
|
|
97147d |
assert len(app.router.keys()) == 1
|
|
|
97147d |
|