[asterisk-dev] [Code Review] 3243: testsuite: manager Originate test for assigning UniqueId on channel creation

Matt Jordan reviewboard at asterisk.org
Sat Feb 22 19:12:33 CST 2014


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



/asterisk/trunk/lib/python/asterisk/test_case.py
<https://reviewboard.asterisk.org/r/3243/#comment20550>

    So I know you're just copying what's here, but as it turns out, there's a much better way of doing this.
    
    Since starpy will only put a key/value pair into an AMI action if the value is not None, you can actually just do the following:
    
    channelid=call_details.get('channelid')
    
    The 'get' method will return the item if present, or None otherwise. That means all of these can be condensed down to a single call to ami.originate (including the async one).



/asterisk/trunk/tests/manager/originate/configs/ast1/extensions.conf
<https://reviewboard.asterisk.org/r/3243/#comment20549>

    Sleep isn't a dialplan application that I'm aware of :-)
    
    Wait is - but I imagine it isn't really needed here. You're really just checking that everything got their IDs and that things got Hungup - so I think you're okay just removing it.



/asterisk/trunk/tests/manager/originate/test-config.yaml
<https://reviewboard.asterisk.org/r/3243/#comment20546>

    Not sure this comment is needed



/asterisk/trunk/tests/manager/originate/test-config.yaml
<https://reviewboard.asterisk.org/r/3243/#comment20547>

    Or this one



/asterisk/trunk/tests/manager/originate/test-config.yaml
<https://reviewboard.asterisk.org/r/3243/#comment20548>

    And here :-)


- Matt Jordan


On Feb. 21, 2014, 11:29 a.m., Scott Griepentrog wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3243/
> -----------------------------------------------------------
> 
> (Updated Feb. 21, 2014, 11:29 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-23120
>     https://issues.asterisk.org/jira/browse/ASTERISK-23120
> 
> 
> Repository: testsuite
> 
> 
> Description
> -------
> 
> Test call origination with a specified Unique ID via AMI. 
> 
> Note: this tests uniqueid setting ;1 local channel only, and may be changed depending on feedback from app-dev-list
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/manager/tests.yaml 4722 
>   /asterisk/trunk/tests/manager/originate/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/manager/originate/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/lib/python/asterisk/test_case.py 4722 
> 
> Diff: https://reviewboard.asterisk.org/r/3243/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Scott Griepentrog
> 
>

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


More information about the asterisk-dev mailing list