def test_success(self): response = CASResponse(self.response_text) self.assertTrue(response.success) self.assertEqual( response.attributes, { u'i2a2characteristics': u'0,3592,2000', u'puid': u'0012345678', u'firstname': u'Jeffrey A', u'lastname': u'Ott', u'fullname': u'Jeffrey A Ott', u'email': u'*****@*****.**', }) self.assertEqual(response.response_type, 'authenticationSuccess') self.assertEqual(response.user, 'jott')
def test_failure(self): response = CASResponse(None) self.assertFalse(response.success) self.assertEqual(response.response_type, 'noResponse')