from abc import ABC
from typing import (
    Sequence,
)

from ._CreatedDatabaseTest import CreatedDatabaseTest
from sqlite_alembic_util import AlembicDatabaseInfo


class DatabaseInfoTest(CreatedDatabaseTest, ABC):
    def get_alembic_database_info(self) -> Sequence[AlembicDatabaseInfo]:
        ret = []
        for db_info in self.get_database_infos():
            ret.append(
                AlembicDatabaseInfo(
                    name=db_info.name,
                    conn_strings=db_info.all_conn_strings,
                )
            )
        return tuple(ret)
