old_contents: from unittest import TestCase
  
  from streaming_form_data.validators import MaxSizeValidator, ValidationError
  
  
  class MaxSizeValidatorTestCase(TestCase):
      def test_max_size(self):
          validator = MaxSizeValidator(5)
  
          for char in 'hello':
              validator(char)
  
          self.assertRaises(ValidationError, validator, 'x')
  
new_contents: import pytest
  
  from streaming_form_data.validators import MaxSizeValidator, ValidationError
  
  
  def test_max_size():
      validator = MaxSizeValidator(5)
  
      for char in 'hello':
          validator(char)
  
      with pytest.raises(ValidationError):
          validator('x')
  
subject: use pytest for validators tests