def METHOD_NAME(self):
    cred = Fido2Credential()
    cred.truncate_names()
    self.assertIsNone(cred.rp_name)
    self.assertIsNone(cred.user_name)
    self.assertIsNone(cred.user_display_name)
    cred.rp_name = "a" * (_NAME_MAX_LENGTH - 2) + "\u0123"
    cred.user_name = "a" * (_NAME_MAX_LENGTH - 1) + "\u0123"
    cred.user_display_name = "a" * _NAME_MAX_LENGTH + "\u0123"
    cred.truncate_names()
    self.assertEqual(cred.rp_name, "a" * (_NAME_MAX_LENGTH - 2) + "\u0123")
    self.assertEqual(cred.user_name, "a" * (_NAME_MAX_LENGTH - 1))
    self.assertEqual(cred.user_display_name, "a" * _NAME_MAX_LENGTH)