Ejemplo n.º 1
0
 def test_failed_vist(self):
     params = {
         'fed_id': '',
         'user_name': '',
         'site_name': '',
         'site_id': '',
         'user_id': '',
         'phone': ''
     }
     visitor = VistaVisitor(params)
     self.cxn.connect()
     self.assertTrue(self.cxn.is_connected)
     user = visitor.visit(self.cxn)
     self.cxn.disconnect()
     self.assertTrue(user is None)
Ejemplo n.º 2
0
 def test_visit(self):
     params = {
         'fed_id': ACCT_ID,
         'user_name': ACCT_USER,
         'site_name': 'ANN ARBOR,MI',
         'site_id': '506',
         'user_id': '1'
     }
     visitor = VistaVisitor(params)
     self.cxn.connect()
     self.assertTrue(self.cxn.is_connected)
     user = visitor.visit(self.cxn)
     self.cxn.disconnect()
     self.assertTrue(user is not None)
     for key in params:
         self.assertEquals(params[key], getattr(user, key))