Esempio n. 1
0
def main():
    DbSessionFactory.global_init('myDocuments.sqlite')
    # (test_call_groups())
    # test_call_documents()
    # test_get_all_documents()
    # (test_doc())
    # test_create_doc('abc')
    # test_update_doc('abc')

    # TEST DOCUMENTS
    # test_create_doc()

    # TEST SECTIONS
    # test_create_section()
    # test_get_all_sections()
    # test_get_sections_by_doc('d60a7e19-6c2c-4d90-92c9-cb8fb6c189a0')
    # test_edit_section()

    # TEST GROUPS
    # for t in range(1,250):
    #     test_create_group(str(t))
    # test_get_doc_group()

    # TEST DOC_PARENT
    # test_create_doc_parent()
    # test_get_doc_parent_report()
    # test_find_parent_child()
    #
    # for _ in range(1,20):
    #     test_create_doc_group_relationships()
    #
    # for _ in range(1,6):
    #     test_create_multiple_doc_parents()

    #
    # for _ in range (1,50000):
    #     r  = 5
    #     t = 4
    #     u = r/t
    #     print(u)

    test_create_multiple_docs()

    # test_get_doc_by_name()

    print('done')
def main():
    DbSessionFactory.global_init('myDocuments.sqlite')
    run_it()
Esempio n. 3
0
def init_db(config):
    settings = config.get_settings()
    db_file = settings.get('db_filename')

    DbSessionFactory.global_init(db_file)