-
Notifications
You must be signed in to change notification settings - Fork 0
/
tester.py
79 lines (64 loc) · 2.07 KB
/
tester.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import httplib
#host = "localhost:8080"
host = "ex-opti.appspot.com"
def NewCallTest():
conn = httplib.HTTPConnection(host)
conn.request("GET", "/?event=NewCall&cid=9602904775&called_number=914466949325&sid=413477837012464&circle=RAJASTHAN&operator=AIRTEL")
r1 = conn.getresponse()
data = r1.read()
print data
def GotDTMFAddEntryTest():
conn = httplib.HTTPConnection(host)
conn.request("GET", "/?event=GotDTMF&sid=413477837012464&data=1")
r1 = conn.getresponse()
data = r1.read()
print data
def GotDTMFCategoryTest():
conn = httplib.HTTPConnection(host)
conn.request("GET", "/?event=GotDTMF&sid=413477837012464&data=1")
r1 = conn.getresponse()
data = r1.read()
print data
def AmountDTMFTest():
conn = httplib.HTTPConnection(host)
conn.request("GET", "/?event=GotDTMF&sid=413477837012464&data=1600")
r1 = conn.getresponse()
data = r1.read()
print data
def GotDTMFSpendingTest():
conn = httplib.HTTPConnection(host)
conn.request("GET", "/?event=GotDTMF&sid=413477837012464&data=2")
r1 = conn.getresponse()
data = r1.read()
print data
def GotDTMFDetailAnalyticsTest():
conn = httplib.HTTPConnection(host)
conn.request("GET", "/?event=GotDTMF&sid=413477837012464&data=2")
r1 = conn.getresponse()
data = r1.read()
print data
def GotDTMFShortAnalyticsTest():
conn = httplib.HTTPConnection(host)
conn.request("GET", "/?event=GotDTMF&sid=413477837012464&data=1")
r1 = conn.getresponse()
data = r1.read()
print data
def GotDTMFThisMonthAnalyticsTest():
conn = httplib.HTTPConnection(host)
conn.request("GET", "/?event=GotDTMF&sid=413477837012464&data=2")
r1 = conn.getresponse()
data = r1.read()
print data
#conn = httplib.HTTPConnection(host)
def option1():
NewCallTest()
GotDTMFAddEntryTest()
GotDTMFCategoryTest()
AmountDTMFTest()
def option2():
print 'option2 is selcted'
NewCallTest()
GotDTMFSpendingTest()
GotDTMFShortAnalyticsTest()
#GotDTMFThisMonthAnalyticsTest()
option2()