Example #1
0
def get_api(
    platform_url: str,
    org_name: str = const.TARGET_ORG_NAME,
    user: str = const.TEACHER,
    token: str = const.TOKEN,
) -> localapi.LocalAPI:
    """Return an instance of the :py:class:`fakeapi.FakeAPI`,
    configured for the tests.
    """
    return localapi.LocalAPI(base_url=platform_url,
                             user=user,
                             org_name=org_name,
                             token=token)
Example #2
0
def api(platform_url):
    return localapi.LocalAPI(
        platform_url, const.TARGET_ORG_NAME, const.TEACHER, const.TOKEN
    )