Ejemplo n.º 1
0
 def test_generate_username_in_lowercase(self):
     """
     Test if the full name that comes from insert_separator method
     it's converted in lowercase.
     """
     saml_other_settings = {'LOWER': True}
     generator = UsernameGenerator(saml_other_settings)
     new_username = generator.process_case('My_Self_User')
     return self.assertEqual(new_username, 'my_self_user')
Ejemplo n.º 2
0
 def test_generate_username_not_lowercase(self):
     """
     Test if the full name that comes from insert_separator method
     is not converted in lowercase and preserves their original lowercases and
     uppers cases.
     """
     saml_other_settings = {'LOWER': False}
     generator = UsernameGenerator(saml_other_settings)
     new_username = generator.process_case('My_Self_User')
     return self.assertEqual(new_username, 'My_Self_User')