File: test_pyramidparser.py

package info (click to toggle)
python-webargs 8.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 696 kB
  • sloc: python: 4,907; makefile: 149
file content (14 lines) | stat: -rw-r--r-- 443 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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}