Ignore:
Timestamp:
Jun 15, 2008 7:43:43 PM (16 years ago)
Author:
bennylp
Message:

Added presence pjsua unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/test-pjsua/mod_call.py

    • Property svn:eol-style set to native
    • Property svn:keywords set to id
    r2017 r2025  
    33import imp 
    44import sys 
    5 import inc_param as param 
    65import inc_const as const 
    76 
     
    98cfg_file = imp.load_source("cfg_file", sys.argv[2]) 
    109 
    11 # Test title 
    12 title = cfg_file.config.title 
    13 port1 = "9060" 
    14  
    15 # First pjsua 
    16 p1 = param.Pjsua( 
    17                 "callee", 
    18                 args = cfg_file.config.callee_cfg.arg + " --local-port="+port1, 
    19                 echo = cfg_file.config.callee_cfg.echo_enabled, 
    20                 trace = cfg_file.config.callee_cfg.trace_enabled 
    21                 ) 
    22  
    23 # Second pjsua, make call to the first one 
    24 p2 = param.Pjsua( 
    25                 "caller", 
    26                 args = cfg_file.config.caller_cfg.arg + " --local-port=0", 
    27                 echo = cfg_file.config.caller_cfg.echo_enabled, 
    28                 trace = cfg_file.config.caller_cfg.trace_enabled 
    29                 ) 
    3010 
    3111# Test body function 
     
    3616        # Caller making call 
    3717        caller.send("m") 
    38         caller.send("sip:localhost:" + port1 + cfg_file.config.uri_param) 
     18        caller.send(t.inst_params[0].uri) 
    3919        caller.expect(const.STATE_CALLING) 
    4020         
     
    147127 
    148128# Here where it all comes together 
    149 test = param.Test(title, run=[p1, p2], func=test_func) 
     129test = cfg_file.test_param 
     130test.test_func = test_func 
    150131 
    151  
Note: See TracChangeset for help on using the changeset viewer.