Fix #18586: rewrite model_package.ModelPackageTests.test_models_packages

Ticket https://code.djangoproject.com/ticket/18586