[1.7.x] Fixed #22602 -- Improved code coverage of makemigrations command tests.

Backport of f851a954ac from master
[1.7.x] Fixed tuple serialization test.

Thanks to rockallite for the report.

Backport of f01d2a8f9be8bc2005b7f1620a2ca40530fb5065 from master.