code: def test_validation_fails_with_trailing_whitespace(self):
      self.form_field_mock.data = "invalid key  "
  
      with pytest.raises(validators.ValidationError):
          self._validate()
  
imports: from __future__ import annotations
  from unittest import mock
  import pytest
  from airflow.www import validators
label_desc: Use image node_id 5 for calling the TestValidKey obj's underlying member method code with example usage: obj.test_validation_fails_with_trailing_whitespace() without return types