'showmigrations --list  displays migrations and whether or not they\'re
applied.'

@override_settings(MIGRATION_MODULES={'migrations': 'migrations.test_migrations'})
def test_showmigrations_list(self):

    out = io.StringIO()
    with mock.patch('django.core.management.color.supports_color', (lambda *args: True)):
        call_command('showmigrations', format='list', stdout=out, verbosity=0, no_color=False)
    self.assertEqual('\x1b[1mmigrations\n\x1b[0m    [    ]    0001_initial\n    [    ]    0002_second\n', out.getvalue().lower())
    call_command('migrate', 'migrations', '0001', verbosity=0)
    out = io.StringIO()
    call_command('showmigrations', 'migrations', format='list', stdout=out, verbosity=0, no_color=True)
    self.assertEqual('migrations\n    [x]    0001_initial\n    [    ]    0002_second\n', out.getvalue().lower())
    call_command('migrate', 'migrations', 'zero', verbosity=0)
