-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
59 lines (52 loc) · 1.54 KB
/
test.py
File metadata and controls
59 lines (52 loc) · 1.54 KB
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
from finalsa import Services, Webhook
token = "YkhWcGN6SXhPRFEzT0RVMU9ERXdPVFF4TmpVMk56TXlOdz09"
#services = Services("http://192.168.1.113:5001", token)
services = Services("http://0.0.0.0:5001", token)
device_token = "0289704490f24ef01366b7efd5e2588c7f17a6f77574f5626eb45e428a32723e"
def test_apn():
topic = "com.finalsa.Server-Managment"
r = services.send_apn( topic, {
"alert" : {
"title" : "Alerta",
"subtitle" : "prubea",
"body" : "dsjndsijnfidsnfindsifnijsdnfidsnufinsduifnsuidf"
},
"sound" : "default",
"badge" : 1
}, device_token,)
print(r)
r = services.send_apn(topic, {
"alert" : {
"title" : "Alerta",
"subtitle" : "prubea",
"body" : "dsjndsijnfidsnfindsifnijsdnfidsnufinsduifnsuidf"
},
"sound" : "default",
"badge" : 1
},
device_token,
hook= Webhook('http://localsdsdk:5001', '', { 'sadasd' :'ad'})
)
print(r)
def test_calixta():
r = services.send_calixta_sms(
"5543670621",
"hola"
)
print(r)
def test_recharge():
r = services.single_recharge(
"INT5", "5543670621",
)
print(r)
def test_email():
r = services.send_email(
'Luis<luis@finalsa.com>', "luisjimenez6245@hotmail.com",
"prueba", "holaaa", content = [
{
'text' : '<html><body><b>aaaa</b></body></html>'
}
]
)
print(r)
test_email()