MCPcopy Create free account
hub / github.com/Pylons/webtest / test_testing

Method test_testing

tests/test_debugapp.py:28–43  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

26 self.assertEqual(res.status_int, 200)
27
28 def test_testing(self):
29 res = self.app.get('/')
30 self.assertEqual(res.status_int, 200)
31 self.assertEqual(res.headers['content-type'], 'text/plain')
32 self.assertEqual(res.content_type, 'text/plain')
33 res = self.app.request('/', method='GET')
34 self.assertEqual(res.status_int, 200)
35 self.assertEqual(res.headers['content-type'], 'text/plain')
36 self.assertEqual(res.content_type, 'text/plain')
37 res = self.app.head('/')
38 self.assertEqual(res.status_int, 200)
39 self.assertEqual(res.headers['content-type'], 'text/plain')
40 self.assertTrue(res.content_length > 0)
41 self.assertEqual(res.body, to_bytes(''))
42 res = self.app.head('/', xhr=True)
43 self.assertEqual(res.status_int, 200)
44
45 def test_post_unicode(self):
46 res = self.app.post(

Callers

nothing calls this directly

Calls 4

to_bytesFunction · 0.90
requestMethod · 0.80
headMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected