Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose CommonTestCase in webargs.testing #288

Merged
merged 1 commit into from
Sep 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
---------

4.1.0 (unreleased)
******************

Features:

* Add ``webargs.testing`` module, which exposes ``CommonTestCase``
to third-party parser libraries (see comments in :pr:`287`).

4.0.0 (2018-07-15)
******************

Expand Down
2 changes: 1 addition & 1 deletion tests/test_aiohttpparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

from webargs.core import MARSHMALLOW_VERSION_INFO
from tests.common import CommonTestCase
from webargs.testing import CommonTestCase
from tests.apps.aiohttp_app import create_app


Expand Down
2 changes: 1 addition & 1 deletion tests/test_bottleparser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest

from .apps.bottle_app import app
from .common import CommonTestCase
from webargs.testing import CommonTestCase


class TestBottleParser(CommonTestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_djangoparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest
from tests.apps.django_app.base.wsgi import application

from tests.common import CommonTestCase
from webargs.testing import CommonTestCase


class TestDjangoParser(CommonTestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_falconparser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import pytest

from tests.common import CommonTestCase
from webargs.testing import CommonTestCase
from tests.apps.falcon_app import create_app


Expand Down
2 changes: 1 addition & 1 deletion tests/test_flaskparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from webargs.core import MARSHMALLOW_VERSION_INFO

from .apps.flask_app import app
from .common import CommonTestCase
from webargs.testing import CommonTestCase


class TestFlaskParser(CommonTestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pyramidparser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from .common import CommonTestCase
from webargs.testing import CommonTestCase


class TestPyramidParser(CommonTestCase):
Expand Down
8 changes: 8 additions & 0 deletions tests/common.py → webargs/testing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# -*- coding: utf-8 -*-
"""Utilities for testing. Includes a base test class
for testing parsers.
.. warning::
Methods and functions in this module may change without
warning and without a major version change.
"""
import json

import pytest
Expand Down