Codebase list python-webargs / master tests / test_pyramidparser.py
master

Tree @master (Download .tar.gz)

test_pyramidparser.py @masterraw · 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}