Rephrasing the call buttons
[theonering] / hand_tests / multi_sms.py
1 #!/usr/bin/python
2
3 import sys
4 sys.path.insert(0,"../src")
5 import logging
6
7 import gvoice.backend as backend
8
9
10 def main():
11         logging.basicConfig(level=logging.DEBUG)
12
13         args = sys.argv
14         username = args[1]
15         password = args[2]
16
17         PHONE_TYPE_HOME = 1
18         PHONE_TYPE_MOBILE = 2
19         PHONE_TYPE_WORK = 3
20         PHONE_TYPE_GIZMO = 7
21
22         outgoingNumber1 = args[3]
23         outgoingNumber2 = args[4]
24
25         b = backend.GVoiceBackend(None)
26         b.login(username, password)
27         assert b.is_authed()
28
29         phoneNumbers = ",".join([outgoingNumber1, outgoingNumber2])
30         page = b._get_page_with_token(
31                 b._sendSmsURL,
32                 {
33                         'phoneNumber': phoneNumbers,
34                         'text': "Broadcast SMS experiment, did it work?",
35                 },
36         )
37         print page
38
39
40 if __name__ == "__main__":
41         main()