def test_pim_wpr_connector_ok (self): "Test if an incoming msg process was sucessfull for wpr connector" req = HttpRequest() req.GET = {'movil':'699998877', 'texto':'CANDELARIA AVISO', 'alias':'CANDELARIA', \ 'msg':'AVISO', 'ticket':'1', 'numcorto':'4404', 'mcc':'', 'mnc':'', } res = pim(req, 'WPR') self.assertEqual (str(res.content), 'TYPE=SMS&TEXT=DUMMY ENCODE')
def test_pim_wrong_connector (self): "Test if a wrong connector is get it" req = HttpRequest() res = pim(req, 'Crazy') self.assertEqual (res, None)
def test_pim_dummy_connector (self): "Test if an incoming msg process was sucesfull for dummy connector" req = HttpRequest() req.GET['message'] = 'CANDELARIA AVISO' res = pim(req, 'Dummy') self.assertEqual (str(res.content), 'DUMMY ENCODE')