Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
207204fe53 | ||
|
7618066b7f | ||
|
554e76ce51 | ||
|
2c51e9d929 | ||
|
ce341f8611 | ||
|
3529809970 | ||
|
1f320c1ad8 | ||
|
c4b5c20ff4 | ||
|
69141302cf | ||
|
df2ef1adc0 | ||
|
76dd0106be | ||
|
9d488db276 | ||
|
4d7e5b0384 | ||
|
6c154c76ff |
@@ -3,8 +3,9 @@ stages:
|
||||
|
||||
publish-pypi:
|
||||
stage: package
|
||||
image: python:3.8
|
||||
image: python:3.10
|
||||
script:
|
||||
- sed -i -e "s/1.12.1/${CI_COMMIT_TAG:1}/g" aiohttp_pydantic/__init__.py
|
||||
- pip install -U setuptools wheel pip; pip install invoke
|
||||
- invoke upload --pypi-user ${PYPI_REPO_USER} --pypi-password ${PYPI_REPO_PASSWORD} --pypi-url ${PYPI_REPO_URL}
|
||||
only:
|
||||
|
@@ -1,5 +1,5 @@
|
||||
from .view import PydanticView
|
||||
|
||||
__version__ = "1.12.1r0"
|
||||
__version__ = "1.12.1"
|
||||
|
||||
__all__ = ("PydanticView", "__version__")
|
||||
__all__ = ("PydanticView", "__version__")
|
@@ -15,14 +15,12 @@ def setup(
|
||||
enable: bool = True,
|
||||
version_spec: Optional[str] = None,
|
||||
title_spec: Optional[str] = None,
|
||||
raise_validation_errors: bool = False,
|
||||
custom_template: Optional[jinja2.Template] = None
|
||||
):
|
||||
if enable:
|
||||
oas_app = web.Application()
|
||||
oas_app["apps to expose"] = tuple(apps_to_expose) or (app,)
|
||||
for a in oas_app["apps to expose"]:
|
||||
a['raise_validation_errors'] = raise_validation_errors
|
||||
oas_app["index template"] = jinja2.Template(
|
||||
oas_app["index template"] = custom_template or jinja2.Template(
|
||||
resources.read_text("aiohttp_pydantic.oas", "index.j2")
|
||||
)
|
||||
oas_app["version_spec"] = version_spec
|
||||
|
@@ -1,45 +1,27 @@
|
||||
{# This updated file is part of swagger_ui_bundle (https://github.com/dtkav/swagger_ui_bundle) #}
|
||||
{# This updated file is part of swagger_ui_bundle (https://github.com/bartsanchez/swagger_ui_bundle) #}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{ title | default('Swagger UI') }}</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_url | trim('/') }}/swagger-ui.css" >
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_url | trim('/') }}/swagger-ui.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_url | trim('/') }}/index.css" />
|
||||
<link rel="icon" type="image/png" href="{{ static_url | trim('/') }}/favicon-32x32.png" sizes="32x32" />
|
||||
<link rel="icon" type="image/png" href="{{ static_url | trim('/') }}/favicon-16x16.png" sizes="16x16" />
|
||||
<style>
|
||||
html
|
||||
{
|
||||
box-sizing: border-box;
|
||||
overflow: -moz-scrollbars-vertical;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
*,
|
||||
*:before,
|
||||
*:after
|
||||
{
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
margin:0;
|
||||
background: #fafafa;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="swagger-ui"></div>
|
||||
|
||||
<script src="{{ static_url | trim('/') }}/swagger-ui-bundle.js"> </script>
|
||||
<script src="{{ static_url | trim('/') }}/swagger-ui-standalone-preset.js"> </script>
|
||||
<script src="{{ static_url | trim('/') }}/swagger-ui-bundle.js" charset="UTF-8"> </script>
|
||||
<script src="{{ static_url | trim('/') }}/swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
// Begin Swagger UI call region
|
||||
const ui = SwaggerUIBundle({
|
||||
url: "{{ openapi_spec_url }}",
|
||||
{% if urls is defined %}
|
||||
urls: {{ urls|tojson|safe }},
|
||||
{% endif %}
|
||||
validatorUrl: {{ validatorUrl | default('null') }},
|
||||
{% if configUrl is defined %}
|
||||
configUrl: "{{ configUrl }}",
|
||||
@@ -54,16 +36,15 @@
|
||||
SwaggerUIBundle.plugins.DownloadUrl
|
||||
],
|
||||
layout: "StandaloneLayout"
|
||||
})
|
||||
});
|
||||
{% if initOAuth is defined %}
|
||||
ui.initOAuth(
|
||||
{{ initOAuth|tojson|safe }}
|
||||
)
|
||||
{% endif %}
|
||||
// End Swagger UI call region
|
||||
|
||||
window.ui = ui
|
||||
}
|
||||
window.ui = ui;
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@@ -127,10 +127,7 @@ def inject_params(
|
||||
else:
|
||||
injector.inject(self.request, args, kwargs)
|
||||
except ValidationError as error:
|
||||
if self.request.app['raise_validation_errors']:
|
||||
raise
|
||||
else:
|
||||
return await self.on_validation_error(error, injector.context)
|
||||
return await self.on_validation_error(error, injector.context)
|
||||
|
||||
return await handler(self, *args, **kwargs)
|
||||
|
||||
|
@@ -3,4 +3,7 @@ requires = [
|
||||
"setuptools >= 46.4.0",
|
||||
"wheel",
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_mode = "auto"
|
@@ -1,42 +1,42 @@
|
||||
async-timeout==3.0.1
|
||||
attrs==21.2.0
|
||||
bleach==4.0.0
|
||||
certifi==2021.5.30
|
||||
cffi==1.14.6
|
||||
chardet==4.0.0
|
||||
charset-normalizer==2.0.4
|
||||
codecov==2.1.11
|
||||
colorama==0.4.4
|
||||
coverage==5.5
|
||||
cryptography==3.4.7
|
||||
docutils==0.17.1
|
||||
idna==3.2
|
||||
importlib-metadata==4.6.3
|
||||
aiohttp==3.8.1
|
||||
aiosignal==1.2.0
|
||||
async-timeout==4.0.2
|
||||
atomicwrites==1.4.1
|
||||
attrs==21.4.0
|
||||
bleach==5.0.1
|
||||
certifi==2022.6.15
|
||||
charset-normalizer==2.1.0
|
||||
codecov==2.1.12
|
||||
colorama==0.4.5
|
||||
commonmark==0.9.1
|
||||
coverage==6.4.2
|
||||
docutils==0.19
|
||||
frozenlist==1.3.0
|
||||
idna==3.3
|
||||
importlib-metadata==4.12.0
|
||||
iniconfig==1.1.1
|
||||
jeepney==0.7.1
|
||||
keyring==23.0.1
|
||||
multidict==5.1.0
|
||||
packaging==21.0
|
||||
pkginfo==1.7.1
|
||||
pluggy==0.13.1
|
||||
py==1.10.0
|
||||
pycparser==2.20
|
||||
Pygments==2.9.0
|
||||
pyparsing==2.4.7
|
||||
pytest==6.1.2
|
||||
pytest-aiohttp==0.3.0
|
||||
pytest-cov==2.10.1
|
||||
readme-renderer==29.0
|
||||
requests==2.26.0
|
||||
keyring==23.7.0
|
||||
multidict==6.0.2
|
||||
packaging==21.3
|
||||
pkginfo==1.8.3
|
||||
pluggy==1.0.0
|
||||
py==1.11.0
|
||||
Pygments==2.12.0
|
||||
pyparsing==3.0.9
|
||||
pytest==7.1.2
|
||||
pytest-aiohttp==1.0.4
|
||||
pytest-asyncio==0.19.0
|
||||
pytest-cov==3.0.0
|
||||
pywin32-ctypes==0.2.0
|
||||
readme-renderer==35.0
|
||||
requests==2.28.1
|
||||
requests-toolbelt==0.9.1
|
||||
rfc3986==1.5.0
|
||||
SecretStorage==3.3.1
|
||||
rfc3986==2.0.0
|
||||
rich==12.5.1
|
||||
six==1.16.0
|
||||
toml==0.10.2
|
||||
tqdm==4.62.0
|
||||
twine==3.4.2
|
||||
typing-extensions==3.10.0.0
|
||||
urllib3==1.26.6
|
||||
tomli==2.0.1
|
||||
twine==4.0.1
|
||||
urllib3==1.26.11
|
||||
webencodings==0.5.1
|
||||
yarl==1.6.3
|
||||
zipp==3.5.0
|
||||
yarl==1.7.2
|
||||
zipp==3.8.1
|
||||
|
@@ -1,23 +1,28 @@
|
||||
async-timeout==3.0.1
|
||||
attrs==21.2.0
|
||||
bleach==4.0.0
|
||||
chardet==4.0.0
|
||||
coverage==5.5
|
||||
docutils==0.17.1
|
||||
idna==3.2
|
||||
aiohttp==3.8.1
|
||||
aiosignal==1.2.0
|
||||
async-timeout==4.0.2
|
||||
atomicwrites==1.4.1
|
||||
attrs==21.4.0
|
||||
bleach==5.0.1
|
||||
charset-normalizer==2.1.0
|
||||
colorama==0.4.5
|
||||
coverage==6.4.2
|
||||
docutils==0.19
|
||||
frozenlist==1.3.0
|
||||
idna==3.3
|
||||
iniconfig==1.1.1
|
||||
multidict==5.1.0
|
||||
packaging==21.0
|
||||
pluggy==0.13.1
|
||||
py==1.10.0
|
||||
Pygments==2.9.0
|
||||
pyparsing==2.4.7
|
||||
pytest==6.1.2
|
||||
pytest-aiohttp==0.3.0
|
||||
pytest-cov==2.10.1
|
||||
readme-renderer==29.0
|
||||
multidict==6.0.2
|
||||
packaging==21.3
|
||||
pluggy==1.0.0
|
||||
py==1.11.0
|
||||
Pygments==2.12.0
|
||||
pyparsing==3.0.9
|
||||
pytest==7.1.2
|
||||
pytest-aiohttp==1.0.4
|
||||
pytest-asyncio==0.19.0
|
||||
pytest-cov==3.0.0
|
||||
readme-renderer==35.0
|
||||
six==1.16.0
|
||||
toml==0.10.2
|
||||
typing-extensions==3.10.0.0
|
||||
tomli==2.0.1
|
||||
webencodings==0.5.1
|
||||
yarl==1.6.3
|
||||
yarl==1.7.2
|
||||
|
14
setup.cfg
14
setup.cfg
@@ -32,18 +32,18 @@ python_requires = >=3.8
|
||||
install_requires =
|
||||
aiohttp
|
||||
pydantic>=1.7
|
||||
swagger-ui-bundle
|
||||
swagger-4-ui-bundle
|
||||
|
||||
[options.extras_require]
|
||||
test =
|
||||
pytest==6.1.2
|
||||
pytest-aiohttp==0.3.0
|
||||
pytest-cov==2.10.1
|
||||
readme-renderer==29.0
|
||||
pytest==7.1.2
|
||||
pytest-aiohttp==1.0.4
|
||||
pytest-cov==3.0.0
|
||||
readme-renderer==35.0
|
||||
ci =
|
||||
%(test)s
|
||||
codecov==2.1.11
|
||||
twine==3.4.2
|
||||
codecov==2.1.12
|
||||
twine==4.0.1
|
||||
|
||||
[options.packages.find]
|
||||
exclude =
|
||||
|
@@ -37,13 +37,14 @@ class ArticleView(PydanticView):
|
||||
|
||||
|
||||
async def test_post_an_article_with_wrong_type_field_should_return_an_error_message(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
|
||||
client = await aiohttp_client(app)
|
||||
resp = await client.post("/article", json={"name": "foo", "nb_page": "foo"})
|
||||
|
||||
assert resp.status == 400
|
||||
assert resp.content_type == "application/json"
|
||||
assert await resp.json() == [
|
||||
|
@@ -98,7 +98,7 @@ async def ensure_content_durability(client):
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def generated_oas(aiohttp_client, loop) -> web.Application:
|
||||
async def generated_oas(aiohttp_client, event_loop) -> web.Application:
|
||||
app = web.Application()
|
||||
app.router.add_view("/pets", PetCollectionView)
|
||||
app.router.add_view("/pets/{id}", PetItemView)
|
||||
|
@@ -29,7 +29,7 @@ class ArticleView(PydanticView):
|
||||
|
||||
|
||||
async def test_post_an_article_without_required_field_should_return_an_error_message(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
@@ -49,7 +49,7 @@ async def test_post_an_article_without_required_field_should_return_an_error_mes
|
||||
|
||||
|
||||
async def test_post_an_article_with_wrong_type_field_should_return_an_error_message(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
@@ -68,7 +68,7 @@ async def test_post_an_article_with_wrong_type_field_should_return_an_error_mess
|
||||
]
|
||||
|
||||
|
||||
async def test_post_an_array_json_is_supported(aiohttp_client, loop):
|
||||
async def test_post_an_array_json_is_supported(aiohttp_client, event_loop):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
|
||||
@@ -81,7 +81,7 @@ async def test_post_an_array_json_is_supported(aiohttp_client, loop):
|
||||
|
||||
|
||||
async def test_post_an_array_json_to_an_object_model_should_return_an_error(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
@@ -101,7 +101,7 @@ async def test_post_an_array_json_to_an_object_model_should_return_an_error(
|
||||
|
||||
|
||||
async def test_post_an_object_json_to_a_list_model_should_return_an_error(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
@@ -120,7 +120,7 @@ async def test_post_an_object_json_to_a_list_model_should_return_an_error(
|
||||
]
|
||||
|
||||
|
||||
async def test_post_a_valid_article_should_return_the_parsed_type(aiohttp_client, loop):
|
||||
async def test_post_a_valid_article_should_return_the_parsed_type(aiohttp_client, event_loop):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
|
||||
|
@@ -61,7 +61,7 @@ class ArticleViewWithSignatureGroup(PydanticView):
|
||||
|
||||
|
||||
async def test_get_article_without_required_header_should_return_an_error_message(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
@@ -81,7 +81,7 @@ async def test_get_article_without_required_header_should_return_an_error_messag
|
||||
|
||||
|
||||
async def test_get_article_with_wrong_header_type_should_return_an_error_message(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
@@ -101,7 +101,7 @@ async def test_get_article_with_wrong_header_type_should_return_an_error_message
|
||||
|
||||
|
||||
async def test_get_article_with_valid_header_should_return_the_parsed_type(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
@@ -116,7 +116,7 @@ async def test_get_article_with_valid_header_should_return_the_parsed_type(
|
||||
|
||||
|
||||
async def test_get_article_with_valid_header_containing_hyphen_should_be_returned(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
@@ -130,7 +130,7 @@ async def test_get_article_with_valid_header_containing_hyphen_should_be_returne
|
||||
assert await resp.json() == {"signature": "2020-10-04T18:01:00"}
|
||||
|
||||
|
||||
async def test_wrong_value_to_header_defined_with_str_enum(aiohttp_client, loop):
|
||||
async def test_wrong_value_to_header_defined_with_str_enum(aiohttp_client, event_loop):
|
||||
app = web.Application()
|
||||
app.router.add_view("/coord", ViewWithEnumType)
|
||||
|
||||
@@ -153,7 +153,7 @@ async def test_wrong_value_to_header_defined_with_str_enum(aiohttp_client, loop)
|
||||
assert resp.content_type == "application/json"
|
||||
|
||||
|
||||
async def test_correct_value_to_header_defined_with_str_enum(aiohttp_client, loop):
|
||||
async def test_correct_value_to_header_defined_with_str_enum(aiohttp_client, event_loop):
|
||||
app = web.Application()
|
||||
app.router.add_view("/coord", ViewWithEnumType)
|
||||
|
||||
@@ -164,7 +164,7 @@ async def test_correct_value_to_header_defined_with_str_enum(aiohttp_client, loo
|
||||
assert resp.content_type == "application/json"
|
||||
|
||||
|
||||
async def test_with_signature_group(aiohttp_client, loop):
|
||||
async def test_with_signature_group(aiohttp_client, event_loop):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleViewWithSignatureGroup)
|
||||
|
||||
|
@@ -11,7 +11,7 @@ class ArticleView(PydanticView):
|
||||
|
||||
|
||||
async def test_get_article_with_correct_path_parameters_should_return_parameters_in_path(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article/{author_id}/tag/{tag}/before/{date}", ArticleView)
|
||||
@@ -24,7 +24,7 @@ async def test_get_article_with_correct_path_parameters_should_return_parameters
|
||||
|
||||
|
||||
async def test_get_article_with_wrong_path_parameters_should_return_error(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article/{author_id}/tag/{tag}/before/{date}", ArticleView)
|
||||
|
@@ -55,7 +55,7 @@ class ArticleViewWithPaginationGroup(PydanticView):
|
||||
|
||||
|
||||
async def test_get_article_without_required_qs_should_return_an_error_message(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
@@ -75,7 +75,7 @@ async def test_get_article_without_required_qs_should_return_an_error_message(
|
||||
|
||||
|
||||
async def test_get_article_with_wrong_qs_type_should_return_an_error_message(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
@@ -95,7 +95,7 @@ async def test_get_article_with_wrong_qs_type_should_return_an_error_message(
|
||||
|
||||
|
||||
async def test_get_article_with_valid_qs_should_return_the_parsed_type(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
@@ -114,7 +114,7 @@ async def test_get_article_with_valid_qs_should_return_the_parsed_type(
|
||||
|
||||
|
||||
async def test_get_article_with_valid_qs_and_omitted_optional_should_return_default_value(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
@@ -133,7 +133,7 @@ async def test_get_article_with_valid_qs_and_omitted_optional_should_return_defa
|
||||
|
||||
|
||||
async def test_get_article_with_multiple_value_for_qs_age_must_failed(
|
||||
aiohttp_client, loop
|
||||
aiohttp_client, event_loop
|
||||
):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
@@ -153,7 +153,7 @@ async def test_get_article_with_multiple_value_for_qs_age_must_failed(
|
||||
assert resp.content_type == "application/json"
|
||||
|
||||
|
||||
async def test_get_article_with_multiple_value_of_tags(aiohttp_client, loop):
|
||||
async def test_get_article_with_multiple_value_of_tags(aiohttp_client, event_loop):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
|
||||
@@ -172,7 +172,7 @@ async def test_get_article_with_multiple_value_of_tags(aiohttp_client, loop):
|
||||
assert resp.content_type == "application/json"
|
||||
|
||||
|
||||
async def test_get_article_with_one_value_of_tags_must_be_a_list(aiohttp_client, loop):
|
||||
async def test_get_article_with_one_value_of_tags_must_be_a_list(aiohttp_client, event_loop):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleView)
|
||||
|
||||
@@ -191,7 +191,7 @@ async def test_get_article_with_one_value_of_tags_must_be_a_list(aiohttp_client,
|
||||
assert resp.content_type == "application/json"
|
||||
|
||||
|
||||
async def test_get_article_without_required_field_page(aiohttp_client, loop):
|
||||
async def test_get_article_without_required_field_page(aiohttp_client, event_loop):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleViewWithPaginationGroup)
|
||||
|
||||
@@ -210,7 +210,7 @@ async def test_get_article_without_required_field_page(aiohttp_client, loop):
|
||||
assert resp.content_type == "application/json"
|
||||
|
||||
|
||||
async def test_get_article_with_page(aiohttp_client, loop):
|
||||
async def test_get_article_with_page(aiohttp_client, event_loop):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleViewWithPaginationGroup)
|
||||
|
||||
@@ -222,7 +222,7 @@ async def test_get_article_with_page(aiohttp_client, loop):
|
||||
assert resp.content_type == "application/json"
|
||||
|
||||
|
||||
async def test_get_article_with_page_and_page_size(aiohttp_client, loop):
|
||||
async def test_get_article_with_page_and_page_size(aiohttp_client, event_loop):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleViewWithPaginationGroup)
|
||||
|
||||
@@ -236,7 +236,7 @@ async def test_get_article_with_page_and_page_size(aiohttp_client, loop):
|
||||
assert resp.content_type == "application/json"
|
||||
|
||||
|
||||
async def test_get_article_with_page_and_wrong_page_size(aiohttp_client, loop):
|
||||
async def test_get_article_with_page_and_wrong_page_size(aiohttp_client, event_loop):
|
||||
app = web.Application()
|
||||
app.router.add_view("/article", ArticleViewWithPaginationGroup)
|
||||
|
||||
|
Reference in New Issue
Block a user