[Asterisk-code-review] pjsip/subscriptions: Fix some sys.path.append's (testsuite[master])

George Joseph asteriskteam at digium.com
Tue Dec 29 16:03:19 CST 2015


George Joseph has uploaded a new change for review.

  https://gerrit.asterisk.org/1883

Change subject: pjsip/subscriptions: Fix some sys.path.append's
......................................................................

pjsip/subscriptions: Fix some sys.path.append's

Some tests are using sys.path.append('lib/python/asterisk') instead of
sys.path.append('lib/python') which is causing errors like
"ImportError: cannot import name Asterisk" in some environments.  Those
have been fixed and the import/from's adjusted accordingly

Change-Id: I77df9177ed693dc9941966d9643bb6f4ca890d16
---
M tests/channels/pjsip/subscriptions/mwi/missing_aor/run-test
M tests/channels/pjsip/subscriptions/mwi/no_accept_header/run-test
M tests/channels/pjsip/subscriptions/presence/digium_presence/run-test
M tests/channels/pjsip/subscriptions/presence/no_accept_header/run-test
4 files changed, 12 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/83/1883/1

diff --git a/tests/channels/pjsip/subscriptions/mwi/missing_aor/run-test b/tests/channels/pjsip/subscriptions/mwi/missing_aor/run-test
index 8a5ceb6..61dc603 100755
--- a/tests/channels/pjsip/subscriptions/mwi/missing_aor/run-test
+++ b/tests/channels/pjsip/subscriptions/mwi/missing_aor/run-test
@@ -10,11 +10,11 @@
 import sys
 import logging
 
-sys.path.append("lib/python/asterisk")
+sys.path.append("lib/python")
 
 from twisted.internet import reactor
-from sipp import SIPpScenario
-from test_case import TestCase
+from asterisk.sipp import SIPpScenario
+from asterisk.test_case import TestCase
 
 LOGGER = logging.getLogger(__name__)
 
diff --git a/tests/channels/pjsip/subscriptions/mwi/no_accept_header/run-test b/tests/channels/pjsip/subscriptions/mwi/no_accept_header/run-test
index 5dade04..8334f99 100755
--- a/tests/channels/pjsip/subscriptions/mwi/no_accept_header/run-test
+++ b/tests/channels/pjsip/subscriptions/mwi/no_accept_header/run-test
@@ -9,11 +9,11 @@
 
 import sys
 
-sys.path.append("lib/python/asterisk")
+sys.path.append("lib/python")
 
 from twisted.internet import reactor
-from sipp import SIPpScenario
-from test_case import TestCase
+from asterisk.sipp import SIPpScenario
+from asterisk.test_case import TestCase
 
 
 class DigiumPresence(TestCase):
diff --git a/tests/channels/pjsip/subscriptions/presence/digium_presence/run-test b/tests/channels/pjsip/subscriptions/presence/digium_presence/run-test
index 1ea298f..d0778fb 100755
--- a/tests/channels/pjsip/subscriptions/presence/digium_presence/run-test
+++ b/tests/channels/pjsip/subscriptions/presence/digium_presence/run-test
@@ -9,11 +9,11 @@
 
 import sys
 
-sys.path.append("lib/python/asterisk")
+sys.path.append("lib/python")
 
 from twisted.internet import reactor
-from sipp import SIPpScenario
-from test_case import TestCase
+from asterisk.sipp import SIPpScenario
+from asterisk.test_case import TestCase
 
 class DigiumPresence(TestCase):
     """Test case for presence on a digium phone"""
diff --git a/tests/channels/pjsip/subscriptions/presence/no_accept_header/run-test b/tests/channels/pjsip/subscriptions/presence/no_accept_header/run-test
index 579b225..8fa5386 100755
--- a/tests/channels/pjsip/subscriptions/presence/no_accept_header/run-test
+++ b/tests/channels/pjsip/subscriptions/presence/no_accept_header/run-test
@@ -9,11 +9,11 @@
 
 import sys
 
-sys.path.append("lib/python/asterisk")
+sys.path.append("lib/python")
 
 from twisted.internet import reactor
-from sipp import SIPpScenario
-from test_case import TestCase
+from asterisk.sipp import SIPpScenario
+from asterisk.test_case import TestCase
 
 
 class DigiumPresence(TestCase):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77df9177ed693dc9941966d9643bb6f4ca890d16
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>



More information about the asterisk-code-review mailing list