Beispiel #1
0
 def test_user_name(self):
     """
     The callback should return a username and full_name
     attribute.
     """
     attributes = user_name_attributes(self.user, self.url)
     self.assertIn('username', attributes)
     self.assertEqual(attributes['username'], 'ellen')
     self.assertIn('full_name', attributes)
     self.assertEqual(attributes['full_name'], 'Ellen Cohen')
Beispiel #2
0
 def test_user_name_attributes(self):
     """
     The callback should return a username, full_name and
     short_name attribute.
     """
     attributes = user_name_attributes(self.user, 'http://www.example.com/')
     self.assertIn('username', attributes)
     self.assertEqual(attributes['username'], 'ellen')
     self.assertIn('full_name', attributes)
     self.assertEqual(attributes['full_name'], 'Ellen Cohen')
     self.assertIn('short_name', attributes)
     self.assertEqual(attributes['short_name'], 'Ellen')