- Timestamp:
- Dec 13, 2013 11:44:51 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/python/test.py
r4619 r4692 48 48 def ua_run_test_exception(): 49 49 print "Exception test.." 50 ep = pj.Endpoint.instance() 50 ep = pj.Endpoint() 51 ep.libCreate() 51 52 got_exception = False 52 53 try: 53 ep. testException()54 ep.natDetectType() 54 55 except pj.Error, e: 55 56 got_exception = True 56 57 print " Got exception: status=%u, reason=%s,\n title=%s,\n srcFile=%s, srcLine=%d" % \ 57 58 (e.status, e.reason, e.title, e.srcFile, e.srcLine) 58 assert e.status == 7001359 assert e.reason == "Invalid operation (PJ_EINVALIDOP)"60 #assert e.title == "Endpoint::testException()"59 assert e.status == 370050 60 assert e.reason.find("PJNATH_ESTUNINSERVER") >= 0 61 assert e.title == "pjsua_detect_nat_type()" 61 62 assert got_exception 62 63 … … 79 80 ep_cfg.logConfig.decor = ep_cfg.logConfig.decor & ~(pj.PJ_LOG_HAS_CR | pj.PJ_LOG_HAS_NEWLINE) 80 81 81 ep = pj.Endpoint .instance()82 ep = pj.Endpoint() 82 83 ep.libCreate() 83 84 ep.libInit(ep_cfg) … … 91 92 ep_cfg = pj.EpConfig() 92 93 93 ep = pj.Endpoint .instance()94 ep = pj.Endpoint() 94 95 ep.libCreate() 95 96 ep.libInit(ep_cfg)
Note: See TracChangeset
for help on using the changeset viewer.