コード例 #1
0
ファイル: __init__.py プロジェクト: gridl/tortoise-orm
def getDBConfig(app_label: str, modules: List[str]) -> dict:
    """
    DB Config factory, for use in testing.
    """
    return _generate_config(_TORTOISE_TEST_DB,
                            app_modules={app_label: modules},
                            testing=True,
                            connection_label=app_label)
コード例 #2
0
def getDBConfig(app_label: str, modules: List[str]) -> dict:
    """
    DB Config factory, for use in testing.

    :param app_label: Label of the app (must be distinct for multiple apps).
    :param modules: List of modules to look for models in.
    """
    return _generate_config(_TORTOISE_TEST_DB,
                            app_modules={app_label: modules},
                            testing=True,
                            connection_label=app_label)