def METHOD_NAME(self):
    """
    Test if form fields has set correct `max_length` property.
    """
    def generate_random_string(length=128):
        return "".join(random.choice(string.ascii_letters + string.digits) for _ in range(length))
    # first case, using `first_name` longer than `User.first_name` can accept,
    # should fail with form error
    data = {
        "first_name": generate_random_string(User._meta.get_field("first_name").max_length + 1),
    }
    form = TenantForm(data)
    self.assertEqual(form.errors["first_name"], ["Ensure this value has at most 150 characters (it has 151)."])
    # second case, using `last_name` longer than `User.last_name` can accept,
    # should fail with form error
    data = {
        "last_name": generate_random_string(User._meta.get_field("last_name").max_length + 1),
    }
    form = TenantForm(data)
    self.assertEqual(form.errors["last_name"], ["Ensure this value has at most 150 characters (it has 151)."])
    # third case, using `email` longer than `User.email` can accept,
    # should fail with form error
    data = {
        "email": generate_random_string(User._meta.get_field("email").max_length) + "@example.com",
    }
    form = TenantForm(data)
    self.assertEqual(form.errors["email"], ["Ensure this value has at most 254 characters (it has 266)."])
    # final case, submit complete (full) form
    data = {
        "name": "default",
        "first_name": generate_random_string(User._meta.get_field("first_name").max_length),
        "last_name": generate_random_string(User._meta.get_field("last_name").max_length),
        "email": generate_random_string(User._meta.get_field("email").max_length - 12) + "@example.com",
    }
    form = TenantForm(data)
    self.assertTrue(form.is_valid())