import logging
from django.test.simple import DjangoTestSuiteRunner
from django.conf import settings


class MyOwnTestRunner(DjangoTestSuiteRunner):

    def run_tests(self, test_labels, extra_tests=None, **kwargs):
        logging.disable(logging.CRITICAL)
return super(MyOwnTestRunner, self).run_tests(test_labels, extra_tests, **
    kwargs)
How can I disable logging while running unit tests in Python Django?