Beispiel #1
0
 def testBadAppend(self):
     """ should raise exceptions for wrong appending"""
     self.improperAppend(twiml.Sms("Hello"))
Beispiel #2
0
def smsResponse(msg):
    r = twiml.Response()
    r.append(twiml.Sms(msg))
    return r
Beispiel #3
0
 def testBody(self):
     """Test hello world"""
     r = Response()
     r.append(twiml.Sms("Hello, World"))
     r = self.strip(r)
     self.assertEquals(r, '<?xml version="1.0" encoding="UTF-8"?><Response><Sms>Hello, World</Sms></Response>')
Beispiel #4
0
 def testActionMethod(self):
     """ Test the action and method parameters on Sms"""
     r = Response()
     r.append(twiml.Sms("Hello", method="POST", action="example.com?id=34&action=hey"))
     r = self.strip(r)
     self.assertEquals(r, '<?xml version="1.0" encoding="UTF-8"?><Response><Sms action="example.com?id=34&amp;action=hey" method="POST">Hello</Sms></Response>')
Beispiel #5
0
 def testEmpty(self):
     """Test empty sms verb"""
     r = Response()
     r.append(twiml.Sms(""))
     r = self.strip(r)
     self.assertEquals(r, '<?xml version="1.0" encoding="UTF-8"?><Response><Sms /></Response>')