[Asterisk-code-review] app queue: Test blind and attended transfers with queues (testsuite[master])

Scott Griepentrog asteriskteam at digium.com
Fri Sep 18 13:19:06 CDT 2015


Scott Griepentrog has posted comments on this change.

Change subject: app_queue: Test blind and attended transfers with queues
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.asterisk.org/#/c/1274/1/tests/apps/queues/transfer/caller_attended/test-config.yaml
File tests/apps/queues/transfer/caller_attended/test-config.yaml:

Line 100:             conditions:
        :                 match:
        :                     Event: 'VarSet'
        :                     Variable: BRIDGEPEER
        :                     Channel: 'PJSIP/alice-.*'
        :                     Value: 'PJSIP/charlie-.*'
        :             count: '3'
        :             conditions:
        :                 match:
        :                     Event: 'VarSet'
        :                     Variable: BRIDGEPEER
        :                     Channel: 'PJSIP/charlie-.*'
        :                     Value: 'PJSIP/alice-.*'
        :             count: '3'
> The two sets of conditions are not duplicated (if that's what you mean). Th
ami-events is a dict, not a list, so after loading this yaml, only the second instance of conditions: will be present.  Since you want to test both conditions, you need to break them out as separate entries in a list somewhere.

As an example:
Python 2.7.5 (default, Jun 24 2015, 00:41:19) 
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>> with open("test.yaml") as file:
...     print yaml.load(file)
... 
{'test': [{'ami-events': {'conditions': {'match': 'two'}}}]}
>>> 
[sgriepentrog at c7-sgriepentrog ~]$ cat test.yaml
test:
    -
        ami-events:
            conditions:
                match: one
            conditions:
                match: two


See also: http://pyyaml.org/ticket/128


-- 
To view, visit https://gerrit.asterisk.org/1274
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I359ce622f4be04c1af7e10a41a39425b6674ea03
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Scott Griepentrog <sgriepentrog at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list