# Path: tests/testapp/utils.py
# def skip_if_mysql_8_plus():
# def column_type(table_name, column_name):
#     def __init__(self, conn=None):
#     def __enter__(self):
#     def __exit__(self, a, b, c):
#     def query(self):
#     def __init__(self, conn=None):
#     def __enter__(self):
#     def __exit__(self, a, b, c):
# def used_indexes(query, using=DEFAULT_DB_ALIAS):
# def fetchall_dicts(cursor):
# class CaptureLastQuery:
# class print_all_queries:


from django.core.management import call_command
from django.test import TestCase, TransactionTestCase
from django_mysql.checks import check_variables
from django_mysql.test.utils import override_mysql_variables
from tests.testapp.utils import skip_if_django_3_1_plus, skip_if_django_before_3_1
from __future__ import annotations




class CallCheckTest(TestCase):

    databases = ["default", "other"]

    @skip_if_django_3_1_plus
    def test_check_old_django(self):
        call_command("check")

    @skip_if_django_before_3_1
    def test_check(self):
        call_command("check", "--database", "default", "--database", "other")


class VariablesTests(TransactionTestCase):

    databases = ["default", "other"]

    @skip_if_django_3_1_plus
    def test_passes_old_django(self):
        assert check_variables(app_configs=None) == []


# Path: tests/testapp/utils.py
# def skip_if_mysql_8_plus():
# def column_type(table_name, column_name):
#     def __init__(self, conn=None):
#     def __enter__(self):
#     def __exit__(self, a, b, c):
#     def query(self):
#     def __init__(self, conn=None):
#     def __enter__(self):
#     def __exit__(self, a, b, c):
# def used_indexes(query, using=DEFAULT_DB_ALIAS):
# def fetchall_dicts(cursor):
# class CaptureLastQuery:
# class print_all_queries:


# Path: tests/testapp/test_checks.py
from django.core.management import call_command
from django.test import TestCase, TransactionTestCase
from django_mysql.checks import check_variables
from django_mysql.test.utils import override_mysql_variables
from tests.testapp.utils import skip_if_django_3_1_plus, skip_if_django_before_3_1

from __future__ import annotations




class CallCheckTest(TestCase):

    databases = ["default", "other"]

    @skip_if_django_3_1_plus
    def test_check_old_django(self):
        call_command("check")

    @skip_if_django_before_3_1
    def test_check(self):
        call_command("check", "--database", "default", "--database", "other")


class VariablesTests(TransactionTestCase):

    databases = ["default", "other"]

    @skip_if_django_3_1_plus
    def test_passes_old_django(self):
        assert check_variables(app_configs=None) == []


    @skip_if_django_before_3_1