'makemigrations exits if it detects a conflict.'

def test_makemigrations_conflict_exit(self):

    with self.temporary_migration_module(module='migrations.test_migrations_conflict'):
        with self.assertRaises(CommandError) as context:
            call_command('makemigrations')
    exception_message = str(context.exception)
    self.assertIn('Conflicting    migrations    detected;    multiple    leaf    nodes    in    the    migration    graph:', exception_message)
    self.assertIn('0002_second', exception_message)
    self.assertIn('0002_conflicting_second', exception_message)
    self.assertIn('in    migrations', exception_message)
    self.assertIn("To    fix    them    run    'python    manage.py    makemigrations    --merge'", exception_message)
