UT: Address mypy errors due to get_url_for_resource

This commit is contained in:
Kekoa Kaaikala 2022-09-30 17:25:49 +00:00
parent a3d2d7f6a1
commit 3409234a4d
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import os import os
import re import re
from collections.abc import Callable from collections.abc import Callable
from typing import Set from typing import Set, Type
import flask_restful import flask_restful
import pytest import pytest
@ -47,7 +47,7 @@ def mock_flask_resource_manager(container):
return flask_resource_manager return flask_resource_manager
def get_url_for_resource(resource: AbstractResource, **kwargs): def get_url_for_resource(resource: Type[AbstractResource], **kwargs):
chosen_url = None chosen_url = None
for url in resource.urls: for url in resource.urls:
if _get_url_keywords(url) == set(kwargs.keys()): if _get_url_keywords(url) == set(kwargs.keys()):