[Asterisk-code-review] test case: Allow the test config for TestCaseModule to be empty (testsuite[master])
Matt Jordan
asteriskteam at digium.com
Sat Oct 24 09:08:03 CDT 2015
Matt Jordan has uploaded a new change for review.
https://gerrit.asterisk.org/1518
Change subject: test_case: Allow the test config for TestCaseModule to be empty
......................................................................
test_case: Allow the test config for TestCaseModule to be empty
TestCaseModule does not require any configuration, although it is relatively
boring in that case. Either way, the constructor for the class should be
tolerant of an empty configuration object.
Change-Id: I646ed342a47343dfd6f07b5f8f56cd9fb8b10091
---
M lib/python/asterisk/test_case.py
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/18/1518/1
diff --git a/lib/python/asterisk/test_case.py b/lib/python/asterisk/test_case.py
index 40f253e..8ff0836 100644
--- a/lib/python/asterisk/test_case.py
+++ b/lib/python/asterisk/test_case.py
@@ -889,6 +889,10 @@
:param test_config The YAML provided test configuration for this object
"""
super(TestCaseModule, self).__init__(test_path, test_config)
+
+ if not test_config:
+ test_config = {}
+
self.asterisk_instances = test_config.get('asterisk-instances') or 1
self.connect_ami = test_config.get('connect-ami') or False
self.connect_agi = test_config.get('connect-agi') or False
--
To view, visit https://gerrit.asterisk.org/1518
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I646ed342a47343dfd6f07b5f8f56cd9fb8b10091
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
More information about the asterisk-code-review
mailing list