summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--For Weekly Test/12-09-2011/gsmselftest.py63
1 files changed, 17 insertions, 46 deletions
diff --git a/For Weekly Test/12-09-2011/gsmselftest.py b/For Weekly Test/12-09-2011/gsmselftest.py
index 39fc10e..ad86784 100644
--- a/For Weekly Test/12-09-2011/gsmselftest.py
+++ b/For Weekly Test/12-09-2011/gsmselftest.py
@@ -362,32 +362,9 @@ def initTrueTable():
else:
print "incomplete test, Handler having error, please do one more test"
- elif destination == 'sip':
- if result =='486':
- i=4
- for y in resultsList:
- call = y[0]
- destination = y[1]
- result = y[2]
- if call == 'sip':
- if result == '200':
- i = i-4
- if result == '486':
- i = i+1
- if destination == 'sip':
- if result == '200':
- i = i-4
- if result == '486':
- i = i+1
- if i > 1:
- print "bad thing happen"
- else:
- print 'Asterisk server working good'
-
elif destination == 'sip':
if result =='486':
- i = 4
j = False
for y in resultsList:
call = y[0]
@@ -395,25 +372,18 @@ def initTrueTable():
result = y[2]
if call == 'sip':
if result == '200':
- i = i-4
j = True
- if result == '486':
- i = i+1
if destination == 'sip':
if result == '200':
- i = i-4
j = True
- if result == '486':
- i = i+1
elif result =='200':
- i = -4
j = True
- if i > 1 and j != True:
- print "bad thing happen"
- else:
+ if j == False:
+ print "Asterisk server indicate having problem"
+ elif j == True:
print 'Asterisk server working good'
def doTest(callFrom,callTo):
@@ -484,7 +454,8 @@ def doAllTest():
doSipTest()
doLandlineTest()
- doGsmTest()
+ doGsmrzTest()
+ doGsmExtTest()
def smartTest():
ping('sip')
@@ -511,11 +482,11 @@ def smartTest():
initTest(callFrom,'GSMRZ3')
if result == '200':
- print "all netwrok on GSMRZ are working"
+ print "all network on GSMRZ are working"
elif result == '486':
print "BTS 3 Down"
else:
- print "have problem with handler"
+ print "incomplete test, Handler having error, please do one more test"
elif result == '486':
print "make a call to GSMRZ3"
@@ -573,7 +544,7 @@ def smartTest():
initTest(callFrom,'GSMExt.Tm')
if result == '200':
- print "All netwrok on GSM external are working"
+ print "All network on GSM external are working"
elif result == '486':
print "T-Mobile card indicate having problem"
else:
@@ -685,7 +656,7 @@ def smartTest():
if result =='200':
print "All SIP network are working"
elif result == '486':
- print "University telphone network indicate having problem"
+ print "University telephone network indicate having problem"
else:
print "incomplete test, Handler having error, please do one more test"
else:
@@ -728,19 +699,19 @@ def smartTest():
elif result == '486':
print "Outgoing call from GSM RZ to GSM external indicate having problem"
else:
- print "incomplete test, GSM External Handler having error, please do one more test"
+ print "incomplete test, GSM Handler having error, please do one more test"
elif result == '486':
initTest('GSMRZ1','GSMExt.O2')
if result =='200':
- print "Outgoing call from GSM RZ to University telphone network indicate having problem"
+ print "Outgoing call from GSM RZ to University telephone network indicate having problem"
elif result == '486':
print "Outgoing call from GSM RZ to GSM external and UTN indicate having problem"
else:
- print "incomplete test, GSM External Handler having error, please do one more test"
+ print "incomplete test, GSM Handler having error, please do one more test"
else:
- print "incomplete test, UTN Handler having error, please do one more test"
+ print "incomplete test, Handler having error, please do one more test"
else:
print "No connection to University telephone network server, check your connection"
@@ -757,7 +728,7 @@ def smartTest():
elif result == '486':
print "Outgoing call from GSM RZ to GSM External and landline indicate having problem"
else:
- print "incomplete test, GSM External Handler having error, please do one more test"
+ print "incomplete test, GSM Handler having error, please do one more test"
elif result == '486':
initTest('GSMRZ1','GSMExt.O2')
@@ -766,13 +737,13 @@ def smartTest():
elif result == '486':
print "Outgoing call from GSM RZ having problem"
else:
- print "incomplete test, GSM External Handler having error, please do one more test"
+ print "incomplete test, GSM Handler having error, please do one more test"
else:
- print "incomplete test, UTN Handler having error, please do one more test"
+ print "incomplete test, Handler having error, please do one more test"
else:
print "No connection to University telephone network server, check your connection"
else:
- print "incomplete test, Landline Handler having error, please do one more test"
+ print "incomplete test, Handler having error, please do one more test"
else:
print "No connection to SIP Gate server, check your connection"