title: How can I disable logging while running unit tests in Python Django?
body: <p>I am using a simple unit test based test runner to test my Django application.</p>
  
  <p>My application itself is configured to use a basic logger in settings.py using:</p>
  
  <pre><code>logging.basicConfig(level=logging.DEBUG)
  </code></pre>
  
  <p>And in my application code using:</p>
  
  <pre><code>logger = logging.getLogger(__name__)
  logger.setLevel(getattr(settings, 'LOG_LEVEL', logging.DEBUG))
  </code></pre>
  
  <p>However, when running unittests, I'd like to disable logging so that it doesn't clutter my test result output. Is there a simple way to turn off logging in a global way, so that the application specific loggers aren't writing stuff out to the console when I run tests?</p>