Skip to content

Commit

Permalink
Expose CommonTestCase in webargs.testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sloria committed Sep 18, 2018
1 parent ef16a7a commit dabb12b
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 6 deletions.
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

0 comments on commit dabb12b

Please sign in to comment.