diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 531f3d7f..1b3a0857 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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) ****************** diff --git a/tests/test_aiohttpparser.py b/tests/test_aiohttpparser.py index 451bb67a..6e65afa3 100644 --- a/tests/test_aiohttpparser.py +++ b/tests/test_aiohttpparser.py @@ -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 diff --git a/tests/test_bottleparser.py b/tests/test_bottleparser.py index f0f32001..f949112d 100644 --- a/tests/test_bottleparser.py +++ b/tests/test_bottleparser.py @@ -1,7 +1,7 @@ import pytest from .apps.bottle_app import app -from .common import CommonTestCase +from webargs.testing import CommonTestCase class TestBottleParser(CommonTestCase): diff --git a/tests/test_djangoparser.py b/tests/test_djangoparser.py index e6f5dc61..5b8497a4 100644 --- a/tests/test_djangoparser.py +++ b/tests/test_djangoparser.py @@ -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): diff --git a/tests/test_falconparser.py b/tests/test_falconparser.py index e73b0c86..77bafd2d 100644 --- a/tests/test_falconparser.py +++ b/tests/test_falconparser.py @@ -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 diff --git a/tests/test_flaskparser.py b/tests/test_flaskparser.py index a3e73def..4b62a8f7 100644 --- a/tests/test_flaskparser.py +++ b/tests/test_flaskparser.py @@ -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): diff --git a/tests/test_pyramidparser.py b/tests/test_pyramidparser.py index 65c1ed49..2f68c7a9 100644 --- a/tests/test_pyramidparser.py +++ b/tests/test_pyramidparser.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .common import CommonTestCase +from webargs.testing import CommonTestCase class TestPyramidParser(CommonTestCase): diff --git a/tests/common.py b/webargs/testing.py similarity index 97% rename from tests/common.py rename to webargs/testing.py index 906dd165..935a4786 100644 --- a/tests/common.py +++ b/webargs/testing.py @@ -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