Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(14)  |  Derive(0)  |  Import(0)

src/w/e/WebCore-HEAD/tests/test_db_sa.py   WebCore(Download)
    def test_successful_operations(self):
        self.assertPostResponse('/create', dict(name="foo"), '200 OK', 'text/plain', body="ok")
        self.assertPostResponse('/load', dict(name="foo"), '200 OK', 'text/plain', body="ok")
        self.assertResponse('/list', '200 OK', 'text/plain', body="foo")
        self.assertPostResponse('/rename', dict(name="foo", newname="bar"), '200 OK', 'text/plain', body="ok")
        self.assertResponse('/list', '200 OK', 'text/plain', body="bar")
        self.assertPostResponse('/delete', dict(name="bar"), '200 OK', 'text/plain', body="ok")
    def test_bad_create(self):
        self.assertPostResponse('/create', dict(name="foo", die="HTTPInternalServerError"),
                '500 Internal Server Error', 'text/plain')
 
        self.assertResponse('/list', '200 OK', 'text/plain', body="")

src/w/e/WebCore-HEAD/tests/test_rest.py   WebCore(Download)
    def test_functional(self):
        self.assertResponse('/test/', body="My name is world.")
        self.assertPostResponse('/test/', dict(name="Alice"), body="Hello Alice!")
        self.assertResponse('/test/', body="My name is Alice.")
 

src/w/e/WebCore-HEAD/tests/test_basic.py   WebCore(Download)
    def test_arguments(self):
        self.assertResponse('/arg/bar', body="got bar")
        self.assertResponse('/arg?foo=baz', body="got baz")
        self.assertPostResponse('/arg', dict(foo='diz'), body="got diz")