def app_context(): """ Configuration object for remote database """ postgres_uri = dbc_support.postgres_uri.get() if not postgres_uri: raise ValueError("DB URI is empty. Please specify the Postgres URI") class AppConfig: SQLALCHEMY_DATABASE_URI = postgres_uri SQLALCHEMY_TRACK_MODIFICATIONS = False return app_lod(AppConfig).app_context()
from converters.txt_to_ac import convert_txt_to_ac # TODO Add functions for C-Prim words for find vernaculars # TODO Check affixes for pred(a,i,o,u,e) - did they added? # TODO Research the source of LEA (le+ra)? Should be lera? # TODO Add parents to Afx from LW (fo > for) make it parentable TESTS = [ 6, ] if __name__ == "__main__": from loglan_db import app_lod with app_lod().app_context(): for SELECTOR in TESTS: if SELECTOR == 1: convert_ac_to_txt() elif SELECTOR == 2: convert_ac_to_pg() elif SELECTOR == 3: convert_pg_to_txt() elif SELECTOR == 4: convert_pg_to_ac() elif SELECTOR == 5:
def test_app_lod(): assert isinstance(app_lod(), Flask)