def _(_): res = testApp.get('/page_with_params_dictionary_as_input?a=A&b=B') expect(res.status) == 200 expect(res.body) != b'{}'
def _(_): res = testApp.get('/page_with_parameters?a=A&a=AA') expect(res.status) == 200 expect(res.body) == b"['A', 'AA']"
def _(_): res = testApp.get('/page_without_params?a=A') expect(res.status) == 200 expect(res.body) == b''
def _(self): res = testApp.get('/missing/page?param=1¶m=2') expect(res.status) == 200 expect(res.body) == b'Missing Page: /missing/page'
def _(_): expect(parseQuery("?a")) == web.Storage(a=True)
def _(self): res = testApp.get('/missingpage') expect(res.status) == 200 expect(res.body) == b'SiteRoot.default'
def _(self): res = testApp.get('/') expect(res.status) == 200 expect(res.body) == b'Missing Page: /'
def _(_): def caller(): res = testApp.post('/assert_post_request') expect(caller).not_raise()
def _(self): res = testApp.get('/noIndexWithDefault') expect(res.status) == 200 expect(res.body) == b'SecondLevelNoIndexWithDefault.default'
def _(_): expect(True) == False
def _(self): res = testApp.get('/withDefault/missingpage/third') expect(res.status) == 200 expect(res.body) == b'SecondLevelWithDefault.default'
def _(self): res = testApp.get('/withDefault/notexposed') expect(res.status) == 200 expect(res.body) == b'SecondLevelWithDefault.default'
def _(self): res = testApp.get('/withoutDefault') expect(res.status) == 200 expect(res.body) == b'SiteRoot.default'
def _(_): res = testApp.get('/page_with_parameters') expect(res.status) == 200 expect(res.body) == b'A'
def _(_): res = testApp.get('/html') expect(res.header('Content-Type')).should.startswith('text/html') expect(res.status) == 200 expect(res.body) == b'HTML'
def _(_): res = testApp.get('/assert_get_request') expect(res.status) == 200 expect(res.body) == b''
def _(_): res = testApp.get('/json') expect(res.header('Content-Type')).should.startswith('application/json') expect(res.status) == 200 content = json.loads(res.body) expect(content) == 'JSON'
def _(_): expect(parseQuery("?")) == web.Storage()
def _(_): res = testApp.get('/zipped_text_as_downloadable_file') expect(res.header('Content-Type')).should.startswith('application/text') expect(res.header('content-disposition')) == 'attachment;filename=myfile.csv' expect(res.status) == 200 expect(unzipIt(res.body)) == b'zipped text file content'
def _(_): expect(parseQuery("?a=A")) == web.Storage(a='A')
def _(self): res = testApp.get('/page') expect(res.status) == 200 expect(res.body) == b'SiteRoot.page'