def METHOD_NAME(self):
    with self.subTest(debug=True):
        with override_settings(DEBUG=True):
            errors_and_warnings = check_upgrade_possible(None)
            self.assertEqual(errors_and_warnings, [])
    with self.subTest(debug=False):
        with override_settings(DEBUG=False):
            errors_and_warnings = check_upgrade_possible(None)
            warning = Warning(
                "Current code version was determined as 'UNKNOWN', which prevents "
                "us from checking your upgrade path. Proceed at your own risk.",
                hint="We recommend only upgrading to tagged releases.",
                id="upgrades.W001",
            )
            self.assertEqual(errors_and_warnings, [warning])