summaryrefslogtreecommitdiffstats
path: root/For Weekly Test/tricode/gsmselftest-website3.py
diff options
context:
space:
mode:
Diffstat (limited to 'For Weekly Test/tricode/gsmselftest-website3.py')
-rw-r--r--For Weekly Test/tricode/gsmselftest-website3.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/For Weekly Test/tricode/gsmselftest-website3.py b/For Weekly Test/tricode/gsmselftest-website3.py
index 78365bf..1ba7767 100644
--- a/For Weekly Test/tricode/gsmselftest-website3.py
+++ b/For Weekly Test/tricode/gsmselftest-website3.py
@@ -83,6 +83,7 @@ def initTrueTable(x):
asterikServer = None
finalResult = list()
for x in initResult.nanoBts:
+ print x
finalResult.append(x)
name = x[0]
if x[1] == True:
@@ -102,7 +103,7 @@ def initTrueTable(x):
elif int(x[1]) == 998 or int(x[1]) == 999:
print bcolors.FAIL+name+ ' not Working, handler error'+ bcolors.ENDC
elif int(x[1]) == 801 or int(x[1]) == 802:
- print bcolors.FAIL+name+ 'Device Error, Check the device'+ bcolors.ENDC
+ print bcolors.FAIL+name+ ' Device Error, Check the device'+ bcolors.ENDC
else:
print bcolors.OKGREEN +name+ ' not Working'+ bcolors.ENDC
@@ -134,6 +135,7 @@ def initTrueTable(x):
def errorCodes(callFrom, callTo, result):
message = '|' + str(callFrom) + '|' + str(callTo) + '|' + str(result) + '|' + str(db.errorCode(result))
+ print message
sendResultWebsite(message)
# function to search in the list
@@ -222,7 +224,7 @@ def smartTest():
#checking unsuccess call, to make sure that destination are really unreachable
for dest in smartResultList:
#check unsuccess call and did the test have already tried, 2 means has been check
- if int(dest[2]) == 486 or int(dest[2]) == 999 or int(dest[2]) == 998:
+ if int(dest[2]) == 486 or int(dest[2]) == 999 or int(dest[2]) == 998 or int(dest[2]) == 801 or int(dest[2]) == 802:
if int(dest[3]) != 2 and dest[1] != 'sip':
testDestination = True
founds = False
@@ -254,7 +256,7 @@ def smartTest():
#check unsuccess call because caller handler having problem
#destination handler having problem, we should make test also to the caller
- if int(dest[2]) == 998:
+ if int(dest[2]) == 998 or int(dest[2]) == 802:
if testCaller == True:
if founds != True:
callFrom = 'sip'
@@ -276,7 +278,7 @@ def smartTest():
for gsmrzResult in smartResultList:
if gsmrzResult[0] == RZ or gsmrzResult[1] == RZ:
- if int(gsmrzResult[2]) == 486:
+ if int(gsmrzResult[2]) == 486 or int(gsmrzResult[2]) == 801 or int(gsmrzResult[2]) == 802:
repeat = True
From = gsmrzResult[0]
To = gsmrzResult[1]
@@ -313,7 +315,9 @@ def doSmartTest(status):
db.updatePingResult('0', sipServer, sipGate, unisip, gsmBox1, gsmBox2)
global makeTest
if status == True:
- WebStatus == True
+ WebStatus = True
+ else:
+ WebStatus = False
makeTest = initTestClass.doTest()
result = smartTest()
initTrueTable(result)