def METHOD_NAME(self):
    obj = HasDateTraits(none_prohibited=UNIX_EPOCH)
    with self.assertRaises(TraitError) as exception_context:
        obj.none_prohibited = None
    message = str(exception_context.exception)
    self.assertIn("must be a non-datetime date, but", message)