                  '  branch 0002_second\n'
                  '    - delete model tribble\n'
                  '    - remove field silly_field from author\n'
                  '    - add field rating to author\n'
                  '    - create model book\n',
                  val
              )
  
      def test_makemigrations_with_custom_name(self):
          """
          makemigrations --name generate a custom migration name.
 
</s> remove                 '    - create model something\n',
                val
            )
            self.assertIn(
 </s> add                 '    - create model something\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         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         exception_message = str(context.exception)
        self.assertIn(
            'Conflicting migrations detected; multiple leaf nodes '
            'in the migration graph:',
            exception_message
 </s> add         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'" </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):
                '    - create model book\n'
                  '  branch 0002_second\n'
                  '    - delete model tribble\n'
                  '    - remove field silly_field from author\n'
                  '    - add field rating to author\n'
                '    - create model book\n'
                '    - create model book\n'
              )
  
      def test_makemigrations_with_custom_name(self):
          """
          makemigrations --name generate a custom migration name.
keep keep keep keep replace replace keep keep keep keep keep
 Sorted conflicting migrations by names. 
tests/migrations/test_commands.py