Codebase list python-webargs / 9e952ed tests / test_pyramidparser.py
9e952ed

Tree @9e952ed (Download .tar.gz)

test_pyramidparser.py @9e952edraw · history · blame

from webargs.testing import CommonTestCase


class TestPyramidParser(CommonTestCase):
    def create_app(self):
        from .apps.pyramid_app import create_app

        return create_app()

    def test_use_args_with_callable_view(self, testapp):
        assert testapp.get("/echo_callable?value=42").json == {"value": 42}

    def test_parse_matchdict(self, testapp):
        assert testapp.get("/echo_matchdict/42").json == {"mymatch": 42}