summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--For Weekly Test/Advance/initTestClass.py35
1 files changed, 18 insertions, 17 deletions
diff --git a/For Weekly Test/Advance/initTestClass.py b/For Weekly Test/Advance/initTestClass.py
index e48337b..b91e07d 100644
--- a/For Weekly Test/Advance/initTestClass.py
+++ b/For Weekly Test/Advance/initTestClass.py
@@ -170,31 +170,32 @@ class doTest:
self.initTest('unisip',callTo)
gsmRZList.remove(callTo)
destList.remove(callTo)
- openBSC = self.result
self.smartResultList.append(['unisip', callTo, self.result])
- if openBSC == 200:
- for callFrom in gsmRZList:
- i = random.randint(0, len(destList)-1) #Check whether the caller and dest are same
+
+ for callFrom in gsmRZList:
+ i = random.randint(0, len(destList)-1) #Check whether the caller and dest are same
+ callTo = destList[i]
+ if callFrom == callTo: #Check whether the caller and dest are same
+ if i == 0:
+ i = i+1 # if it in the first list, change to be the second list else, just back on step.
+ else:
+ i = i-1
callTo = destList[i]
- if callFrom == callTo: #Check whether the caller and dest are same
- if i == 0:
- i = i+1
- else:
- i = i-1
- callTo = destList[i]
- self.initTest(callFrom,callTo)
- destList.remove(callTo)
- destList.remove(callFrom)
- gsmRZList.remove(callFrom)
- self.smartResultList.append([callFrom, callTo, self.result])
+ self.initTest(callFrom,callTo)
+ destList.remove(callTo)
+ destList.remove(callFrom)
+ gsmRZList.remove(callFrom)
+ self.smartResultList.append([callFrom, callTo, self.result])
+ # test incoming call from outside rz network to gsm rz
i = random.randint(0, len(gsmRZList)-1) #
callTo = gsmRZList[i]
self.initTest('landline',callTo)
- gsmRZList.remove(callTo)
- #destList.remove(callTo)
+
+ if isThere(callTo,destList) == 1: # Checking whether caller at gsmrz list in the destination list, if yes delete it.
+ destList.remove(callTo)
self.smartResultList.append(['landline', callTo, self.result])
for callTo in destList: