def testCreateApplication(userName, password, url): name = "new app2" voiceUrl = "http://website2.com" messagingUrl = "http://website1.com" platform = "scripting" partition = "staging" tropoTest = TropoProvisioning(username="******", password="******", url="https://api.tropo.com/v1/", requestType="FORM-ENCODED") testResp = tropoTest.create_application(name, voiceUrl, messagingUrl, platform, partition, data_format.JSON) print "Resp = %s" % testResp name = "new app2" tropoTest = TropoProvisioning(requestType="XML") testResp = tropoTest.create_application(name, voiceUrl, messagingUrl, platform, partition, data_format.XML) print "Resp = %s" % testResp name = "new app3" tropoTest = TropoProvisioning(requestType="FORM-ENCODED") testResp = tropoTest.create_application(name, voiceUrl, messagingUrl, platform, partition, data_format.FORM_ENCODED) print "Resp = %s" % testResp
def testCreateApplication(userName, password, url): name = "new app2" voiceUrl = "http://website2.com" messagingUrl = "http://website1.com" platform = "scripting" partition = "staging" tropoTest = TropoProvisioning(username="******", password="******", url="https://api.tropo.com/v1/", requestType="FORM-ENCODED") testResp = tropoTest.create_application(name, voiceUrl, messagingUrl, platform, partition, data_format.JSON) print "Resp = %s"% testResp name = "new app2" tropoTest = TropoProvisioning(requestType="XML") testResp = tropoTest.create_application(name, voiceUrl, messagingUrl, platform, partition, data_format.XML) print "Resp = %s"% testResp name = "new app3" tropoTest = TropoProvisioning(requestType="FORM-ENCODED") testResp = tropoTest.create_application(name, voiceUrl, messagingUrl, platform, partition, data_format.FORM_ENCODED) print "Resp = %s"% testResp
def test_CreateApplication_failed(self): name = "new app1" voiceUrl = "http://website1.com" messagingUrl = "http://website1.com" platform = "scripting" partition = "staging" tropoTest = TropoProvisioning() testResp = tropoTest.create_application(name, voiceUrl, messagingUrl, platform, partition, "data_format.JSON") print "Response = %s"% testResp result = testResp.find("failed") self.assertNotEqual(result, -1)
def test_CreateApplication_failed(self): name = "new app1" voiceUrl = "http://website1.com" messagingUrl = "http://website1.com" platform = "scripting" partition = "staging" tropoTest = TropoProvisioning() testResp = tropoTest.create_application(name, voiceUrl, messagingUrl, platform, partition, "data_format.JSON") print "Response = %s" % testResp result = testResp.find("failed") self.assertNotEqual(result, -1)