          """
          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)
 
</s> remove         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)
 </s> add  </s> remove         with self.assertRaisesMessage(CommandError, "Conflicting migrations detected"):
 </s> add         msg = (
            "Conflicting migrations detected; multiple leaf nodes in the "
            "migration graph: (0002_conflicting_second, 0002_second in "
            "migrations).\n"
            "To fix them run 'python manage.py makemigrations --merge'"
        )
        with self.assertRaisesMessage(CommandError, msg): </s> remove                 '    - create model book\n',
                val
 </s> add                 '    - create model book\n' </s> remove             val = out.getvalue().lower()
            self.assertIn('merging conflicting_app_with_dependencies\n', val)
            self.assertIn(
 </s> add             self.assertEqual(
                out.getvalue().lower(),
                'merging conflicting_app_with_dependencies\n' </s> remove                 '    - create model something\n',
                val
            )
            self.assertIn(
 </s> add                 '    - create model something\n'
        self.assertEqual(
            str(context.exception),
            "Conflicting migrations detected; multiple leaf nodes in the "
            "migration graph: (0002_conflicting_second, 0002_second in "
            "migrations).\n"
            "To fix them run 'python manage.py makemigrations --merge'"
          """
          with self.temporary_migration_module(module="migrations.test_migrations_conflict"):
              with self.assertRaises(CommandError) as context:
                  call_command("makemigrations")
        self.assertEqual(
            str(context.exception),
            "Conflicting migrations detected; multiple leaf nodes in the "
            "migration graph: (0002_conflicting_second, 0002_second in "
            "migrations).\n"
            "To fix them run 'python manage.py makemigrations --merge'"
        self.assertEqual(
            str(context.exception),
            "Conflicting migrations detected; multiple leaf nodes in the "
            "migration graph: (0002_conflicting_second, 0002_second in "
            "migrations).\n"
            "To fix them run 'python manage.py makemigrations --merge'"
        self.assertEqual(
            str(context.exception),
            "Conflicting migrations detected; multiple leaf nodes in the "
            "migration graph: (0002_conflicting_second, 0002_second in "
            "migrations).\n"
            "To fix them run 'python manage.py makemigrations --merge'"
        self.assertEqual(
            str(context.exception),
            "Conflicting migrations detected; multiple leaf nodes in the "
            "migration graph: (0002_conflicting_second, 0002_second in "
            "migrations).\n"
            "To fix them run 'python manage.py makemigrations --merge'"
        self.assertEqual(
            str(context.exception),
            "Conflicting migrations detected; multiple leaf nodes in the "
            "migration graph: (0002_conflicting_second, 0002_second in "
            "migrations).\n"
            "To fix them run 'python manage.py makemigrations --merge'"
          )
          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)
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 Sorted conflicting migrations by names. 
tests/migrations/test_commands.py