[asterisk-dev] [Code Review] 3151: res_pjsip: PJSUA pluggable module and subscription tests

Matt Jordan reviewboard at asterisk.org
Mon Jan 27 11:21:49 CST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3151/#review10702
-----------------------------------------------------------



/asterisk/trunk/lib/python/asterisk/pluggable_modules.py
<https://reviewboard.asterisk.org/r/3151/#comment20204>

    Particularly for modules in the lib folder, our code should attempt to adhere to PEP 8 guidelines. That means docstrings for all classes, functions, etc.
    
    I'd run pylint on this and correct what you can find.


- Matt Jordan


On Jan. 24, 2014, 5 p.m., Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3151/
> -----------------------------------------------------------
> 
> (Updated Jan. 24, 2014, 5 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: testsuite
> 
> 
> Description
> -------
> 
> When creating the changes on https://reviewboard.asterisk.org/r/3150/, I realized that there were no subscription tests in the testsuite for res_pjsip yet.
> 
> In order to properly test subscriptions, I could not use SIPp, since removing the subscription requires the ability to handle two active transactions, and SIPp chokes when that happens. Since PJSUA is smarter and has python bindings, I decided to use that instead for the tests. In oder to do things the right way(tm), I decided to create a pluggable module for the testsuite that allows for PJSUA transports, accounts, and buddies to be created using yaml. Once all PJSUA accounts are registered, then a specified callback can be called to continue the test.
> 
> As far as actual tests are concerned, I've added three tests that use the new PJSUA plugin. There are two presence tests that test PIDF and XPIDF, and there is an MWI test. I was forced to use unsolicited MWI for the MWI test since the PJSUA python bindings do not have the ability to convey that an account should subscribe for MWI.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/channels/pjsip/tests.yaml 4595 
>   /asterisk/trunk/tests/channels/pjsip/presence_xpidf/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_xpidf/state_check.py PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_xpidf/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_xpidf/configs/ast1/modules.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_xpidf/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_pidf/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_pidf/state_check.py PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_pidf/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_pidf/configs/ast1/modules.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/presence_pidf/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/mwi/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/mwi/mwi_check.py PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/mwi/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/mwi/configs/ast1/modules.conf PRE-CREATION 
>   /asterisk/trunk/lib/python/asterisk/pluggable_modules.py 4595 
> 
> Diff: https://reviewboard.asterisk.org/r/3151/diff/
> 
> 
> Testing
> -------
> 
> The tests pass.
> 
> 
> Thanks,
> 
> Mark Michelson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140127/ea2789f5/attachment-0001.html>


More information about the asterisk-dev mailing list