      def test_uuidfield_3(self):
          field = UUIDField()
          with self.assertRaises(ValidationError) as cm:
              field.clean('550e8400')
          self.assertEqual(cm.exception.messages[0], 'Enter a valid UUID.')
  
      def test_uuidfield_4(self):
          field = UUIDField()
          value = field.prepare_value(uuid.UUID('550e8400e29b41d4a716446655440000'))
          self.assertEqual(value, '550e8400e29b41d4a716446655440000')
 
</s> remove         with self.assertRaises(ValidationError) as cm:
 </s> add         with self.assertRaisesMessage(ValidationError, 'Enter a valid UUID.'): </s> remove         with self.assertRaises(ValueError):
 </s> add         msg = 'The database backend does not accept 0 as a value for AutoField.'
        with self.assertRaisesMessage(ValueError, msg): </s> remove             with self.assertRaises(FieldError):
 </s> add             msg = "Joined field references are not permitted in this query"
            with self.assertRaisesMessage(FieldError, msg): </s> remove         with self.assertRaises(AssertionError):
 </s> add         msg = 'Cannot update a query once a slice has been taken.'
        with self.assertRaisesMessage(AssertionError, msg): </s> remove         with self.assertRaises(TypeError):
 </s> add         msg = 'Model instances without primary key value are unhashable'
        with self.assertRaisesMessage(TypeError, msg):
      def test_uuidfield_3(self):
          field = UUIDField()
          with self.assertRaises(ValidationError) as cm:
              field.clean('550e8400')

  
      def test_uuidfield_4(self):
          field = UUIDField()
          value = field.prepare_value(uuid.UUID('550e8400e29b41d4a716446655440000'))
          self.assertEqual(value, '550e8400e29b41d4a716446655440000')
keep keep keep keep replace keep keep keep keep keep
 Used assertRaisesMessage() to test Django's error messages. 
tests/forms_tests/field_tests/test_uuidfield.py