Fixed #22602 -- Improved code coverage of makemigrations command tests.