'--no-color prevent colorization of the output'

def test_command_no_color(self):

    class Command(BaseCommand, ):
        requires_system_checks = False
        def handle(self, *args, **options):
            self.stdout.write('Hello,    world!', self.style.ERROR)
            self.stderr.write('Hello,    world!', self.style.ERROR)
    out = StringIO()
    err = StringIO()
    command = Command(stdout=out, stderr=err, no_color=True)
    call_command(command)
    self.assertEqual(out.getvalue(), 'Hello,    world!\n')
    self.assertEqual(err.getvalue(), 'Hello,    world!\n')
    out = StringIO()
    err = StringIO()
    command = Command(stdout=out, stderr=err)
    call_command(command, no_color=True)
    self.assertEqual(out.getvalue(), 'Hello,    world!\n')
    self.assertEqual(err.getvalue(), 'Hello,    world!\n')
