def METHOD_NAME(self):
    """Test the task check_for_migrations."""
    # Update disabled
    InvenTree.tasks.check_for_migrations()
    # Update enabled - no migrations
    os.environ['INVENTREE_AUTO_UPDATE'] = 'True'
    InvenTree.tasks.check_for_migrations()
    # Create migration
    self.assertEqual(len(InvenTree.tasks.get_migration_plan()), 0)
    call_command('makemigrations', ['InvenTree', '--empty'], interactive=False)
    self.assertEqual(len(InvenTree.tasks.get_migration_plan()), 1)
    # Run with migrations - catch no foreigner error
    try:
        InvenTree.tasks.check_for_migrations()
    except NotSupportedError as e:  # pragma: no cover
        if settings.DATABASES['default']['ENGINE'] != 'django.db.backends.sqlite3':
            raise e
    # Cleanup
    try:
        migration_name = InvenTree.tasks.get_migration_plan()[0][0].name + '.py'
        migration_path = settings.BASE_DIR / 'InvenTree' / 'migrations' / migration_name
        migration_path.unlink()
    except IndexError:  # pragma: no cover
        pass