summaryrefslogtreecommitdiffstats
path: root/For Weekly Test/12-09-2011
diff options
context:
space:
mode:
authorgsmselgtest2011-08-29 19:12:26 +0200
committergsmselgtest2011-08-29 19:12:26 +0200
commitd43cce885178d62dbb1ee4716d478ab2deb78cad (patch)
tree2f78574afcf6ddef3939cdfeda4ab20ab89b11cd /For Weekly Test/12-09-2011
parenttrue table tester (diff)
downloadgsm-selftest-d43cce885178d62dbb1ee4716d478ab2deb78cad.tar.gz
gsm-selftest-d43cce885178d62dbb1ee4716d478ab2deb78cad.tar.xz
gsm-selftest-d43cce885178d62dbb1ee4716d478ab2deb78cad.zip
fix problem on sip true table
Diffstat (limited to 'For Weekly Test/12-09-2011')
-rw-r--r--For Weekly Test/12-09-2011/gsmselftest.py61
-rw-r--r--For Weekly Test/12-09-2011/truetable.py70
2 files changed, 55 insertions, 76 deletions
diff --git a/For Weekly Test/12-09-2011/gsmselftest.py b/For Weekly Test/12-09-2011/gsmselftest.py
index 0fa63e0..fa36e01 100644
--- a/For Weekly Test/12-09-2011/gsmselftest.py
+++ b/For Weekly Test/12-09-2011/gsmselftest.py
@@ -384,48 +384,35 @@ def initTrueTable(caller):
elif destination == 'sip':
if result =='486':
-
+ i=1
for y in resultsList:
- destination = y[1]
- result = y[2]
-
- if destination == 'sip':
- if result == '200':
-
- for y in resultsList:
- call = y[0]
- result = y[2]
- if call == 'sip':
- if result == '200':
- print "SIP working good"
- elif result == '486':
- print "Asterisk server down"
- else:
- print "incomplete test, Handler having error, please do one more test"
+ call = y[0]
+ result = y[2]
+ if call == 'sip':
+ if result == '200':
+ i = i-1
+ if result == '486':
+ i = i+1
+ if i > 1:
+ print "bad thing happen"
+ else:
+ print 'Asterisk server working good'
elif result =='200':
-
+ i = 0
for y in resultsList:
-
- destination = y[1]
- result = y[2]
-
- if destination == 'sip':
- if result == '200':
- print "SIP working good"
- elif result == '486':
-
- for y in resultsList:
- call = y[0]
- result = y[2]
- if call == 'sip':
- if result == '200':
- print "SIP working good"
- else:
- print "incomplete test, Handler having error, please do one more test"
+ call = y[0]
+ result = y[2]
+ if call == 'sip':
+ if result == '200':
+ i = i-1
+ if result == '486':
+ i = i+1
+ if i > 1:
+ print "bad thing happen"
+ else:
+ print 'Asterisk server working good'
- else:
- print "incomplete test, Handler having error, please do one more test"
def doTest(callFrom,callTo):
diff --git a/For Weekly Test/12-09-2011/truetable.py b/For Weekly Test/12-09-2011/truetable.py
index 0466cb4..4f784e8 100644
--- a/For Weekly Test/12-09-2011/truetable.py
+++ b/For Weekly Test/12-09-2011/truetable.py
@@ -1,5 +1,5 @@
def initTrueTable(caller):
-resultsList = [['sip', 'GSMExt.Eplus', '200'], ['sip', 'GSMExt.Tm', '200'], ['sip', 'GSMExt.O2', '200'], ['sip', 'GSMExt.Voda', '200'], ['sip', 'landline', '200'], ['sip', 'unisip', '200'], ['unisip', 'sip', '486']]
+ resultsList = [['sip', 'GSMExt.Eplus', '200'], ['sip', 'GSMExt.Tm', '200'], ['sip', 'GSMExt.O2', '200'], ['sip', 'GSMExt.Voda', '200'], ['sip', 'landline', '200'], ['sip', 'unisip', '200'], ['unisip', 'sip', '486']]
for x in resultsList:
@@ -281,48 +281,40 @@ resultsList = [['sip', 'GSMExt.Eplus', '200'], ['sip', 'GSMExt.Tm', '200'], ['si
elif destination == 'sip':
if result =='486':
-
+ i=1
for y in resultsList:
- destination = y[1]
- result = y[2]
-
- if destination == 'sip':
- if result == '200':
-
- for y in resultsList:
- call = y[0]
- result = y[2]
- if call == 'sip':
- if result == '200':
- print "SIP working good"
- elif result == '486':
- print "Asterisk server down"
- else:
- print "incomplete test, Handler having error, please do one more test"
+ call = y[0]
+ result = y[2]
+ if call == 'sip':
+ if result == '200':
+ i = i-1
+ if result == '486':
+ i = i+1
+ if i > 1:
+ print "bad thing happen"
+ else:
+ print 'Asterisk server working good'
elif result =='200':
-
+ i = 0
for y in resultsList:
-
- destination = y[1]
- result = y[2]
-
- if destination == 'sip':
- if result == '200':
- print "SIP working good"
- elif result == '486':
-
- for y in resultsList:
- call = y[0]
- result = y[2]
- if call == 'sip':
- if result == '200':
- print "SIP working good"
- else:
- print "incomplete test, Handler having error, please do one more test"
+ call = y[0]
+ result = y[2]
+ if call == 'sip':
+ if result == '200':
+ i = i-1
+ if result == '486':
+ i = i+1
+ if i > 1:
+ print "bad thing happen"
+ else:
+ print 'Asterisk server working good'
- else:
- print "incomplete test, Handler having error, please do one more test"
callerList = [['sip'],['unisip']]
-initTrueTable(caller)
+for caller in callerList:
+ initTrueTable(caller[0])
+
+
+
+