add test client and mock cast library
This commit is contained in:
parent
0f526a5543
commit
06413828a9
|
@ -7,7 +7,7 @@ class LibSMSCast:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.client = TwilioRestClient(config.ACCOUNT_SID, config.AUTH_TOKEN)
|
self.client = TwilioRestClient(config.ACCOUNT_SID, config.AUTH_TOKEN)
|
||||||
|
|
||||||
def send(to, msg):
|
def send(self, to, msg):
|
||||||
for recipient in to:
|
for recipient in to:
|
||||||
self.client.messages.create(
|
self.client.messages.create(
|
||||||
to=recipient,
|
to=recipient,
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
class LibSMSCast:
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
def send(self, to, msg):
|
||||||
|
for recipient in to:
|
||||||
|
print("\"{}\" -> {}".format(msg, recipient))
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
from mocksmscast import LibSMSCast
|
||||||
|
|
||||||
|
client = LibSMSCast()
|
||||||
|
|
||||||
|
client.send(['test number'], "hello world")
|
Loading…
Reference in New Issue