def test_good_saml(self):
     """
     We have valid SAML with the expected fields in it. We should get back
     the expected information.
     """
     username, email, firstname, surname = get_user_info(VALID_SAML)
     self.assertEqual('mohammed_khaliq', username)
     self.assertEqual('*****@*****.**', email)
     self.assertEqual('Mohammed', firstname)
     self.assertEqual('Khaliq', surname)
Exemplo n.º 2
0
 def test_good_saml(self):
     """
     We have valid SAML with the expected fields in it. We should get back
     the expected information.
     """
     username, email, firstname, surname = get_user_info(VALID_SAML)
     self.assertEqual('mohammed_khaliq', username)
     self.assertEqual('*****@*****.**', email)
     self.assertEqual('Mohammed', firstname)
     self.assertEqual('Khaliq', surname)
 def test_no_user_details(self):
     """
     Given some valid XML that doesn't contain the expected tags just
     return empty values.
     """
     empty_xml = '<xml/>'
     username, email, firstname, surname = get_user_info(empty_xml)
     self.assertEqual(None, username)
     self.assertEqual(None, email)
     self.assertEqual(None, firstname)
     self.assertEqual(None, surname)
Exemplo n.º 4
0
 def test_no_user_details(self):
     """
     Given some valid XML that doesn't contain the expected tags just
     return empty values.
     """
     empty_xml = '<xml/>'
     username, email, firstname, surname = get_user_info(empty_xml)
     self.assertEqual(None, username)
     self.assertEqual(None, email)
     self.assertEqual(None, firstname)
     self.assertEqual(None, surname)