[Asterisk-code-review] pjsip: Refactor out various AMISendTest implementations (testsuite[master])

Kevin Harwell asteriskteam at digium.com
Tue Apr 21 16:43:18 CDT 2015


Kevin Harwell has posted comments on this change.

Change subject: pjsip:  Refactor out various AMISendTest implementations
......................................................................


Patch Set 7:

(4 comments)

https://gerrit.asterisk.org/#/c/153/7/lib/python/asterisk/ami.py
File lib/python/asterisk/ami.py:

Line 325: class AMISendAction(TestCase):
        :     def __init__(self, path=None, config=None):
        :         super(AMISendAction, self).__init__(path, config)
        :         self.config = config
        :         self.action = config.get('ACTION')
        :         if not self.action:
        :             raise Exception('"ACTION" was not defined in test-config.yaml')
        :         self.create_asterisk()
        : 
        :     def run(self):
        :         super(AMISendAction, self).run()
        :         self.create_ami_factory()
        : 
        :     def ami_connect(self, ami):
        :         ami.sendDeferred(self.action).addCallback(self.__on_response)
        : 
        :     def __on_response(self, result):
        :         # stop test since done
        :         self.stop_reactor()
Add some comments to this class and function.


https://gerrit.asterisk.org/#/c/153/7/tests/channels/pjsip/ami/show_endpoint/test-config.yaml
File tests/channels/pjsip/ami/show_endpoint/test-config.yaml:

Line 19:     add-test-to-search-path: 'True'
I *think* this line can be removed from this and all tests in this review since there is no longer an external test file being used.


https://gerrit.asterisk.org/#/c/153/7/tests/channels/pjsip/ami/show_registrations_inbound/test-config.yaml
File tests/channels/pjsip/ami/show_registrations_inbound/test-config.yaml:

Line 53: 
       : 
       : 
       : 
       : 
       : 
       : 
       : 
       : 
       : 
       : 
       : 
Any reason why this was removed? Doing so makes it so the test no longer checks the "complete" event.


https://gerrit.asterisk.org/#/c/153/7/tests/channels/pjsip/ami/show_registrations_outbound/test-config.yaml
File tests/channels/pjsip/ami/show_registrations_outbound/test-config.yaml:

Line 43:                 match:
       :                     Event: 'OutboundRegistrationDetail'
       :                     ObjectName: 'user0'
       :             requirements:
       :                 match:
       :                     ActionID: '12345'
       :                     ObjectType: 'registration'
       :   
Just curious as to why these were split up? Was there a problem with the regex matching?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0d3e5298114bd4eb676537a816bc6e437036642b
Gerrit-PatchSet: 7
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list