From d43cce885178d62dbb1ee4716d478ab2deb78cad Mon Sep 17 00:00:00 2001 From: gsmselgtest Date: Mon, 29 Aug 2011 19:12:26 +0200 Subject: fix problem on sip true table --- For Weekly Test/12-09-2011/gsmselftest.py | 61 +++++++++++---------------- For Weekly Test/12-09-2011/truetable.py | 70 ++++++++++++++----------------- 2 files changed, 55 insertions(+), 76 deletions(-) (limited to 'For Weekly Test/12-09-2011') 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]) + + + + -- cgit v1.2.3-55-g7522