Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(3) | Call(3) | Derive(0) | Import(0)
Fail unless an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is raised, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception. If called with callableObj omitted or None, will return a context object used like this:: (more...)
src/w/e/WebCore-HEAD/tests/test_rpc_xml.py WebCore(Download)
def test_bad_xml_input(self): request = Request.blank('/', method="POST", body="<foo") response = request.get_response(self.app) self.assertRaises(xmlrpclib.Fault, xmlrpclib.loads, response.body)
src/w/e/WebCore-HEAD/tests/test_auth.py WebCore(Download)
def test_exceptions(self): self.assertRaises(Exception, lambda: WebAuth(None)) def test_get_method_null(self): self.assertEqual(self.wa.get_method(''), None)
src/w/e/WebCore-HEAD/tests/test_basic.py WebCore(Download)
def test_base_class(self): self.assertRaises(NotImplementedError, lambda: web.core.Dialect()(None)) def test_dialect_transition(self): self.assertResponse('/sub/', body='it works')