def test_updating_phenotype(demo_db_path): con = database.ConnectDatabase(demo_db_path) od = admin_tools.OperateDatabase() phenotype = (1, 1, "A", "T", "synaptical", 1) out = od.updating_phenotype(con, phenotype) assert "The table phenotype has been updated. Call -p to see the changes." in out
def test_delete_data_phenotype_error(tmpdir): path_db = str(tmpdir.join("test.sqlite3")) con = database.ConnectDatabase(path_db) od = admin_tools.OperateDatabase() out = od.delete_data_phenotype(con, "1") assert "An error has occured:" in out
def test_updating_populations(demo_db_path): con = database.ConnectDatabase(demo_db_path) od = admin_tools.OperateDatabase() populations = (1, 1, "A", "T", 4, 3, 4, 0, 0, 3, "GER", 1) out = od.updating_populations(con, populations) assert "The table populations has been updated. Call -p to see the changes." in out
def test_updating_allel(demo_db_path): con = database.ConnectDatabase(demo_db_path) od = admin_tools.OperateDatabase() allel = (1, 1, "A", "T", 4, 3, 4, 0, 0, 3) out = od.updating_allel(con, allel) assert "The table allel has been updated. Call -p to see the changes." in out
def test_count_variants_error(tmpdir): path_db = str(tmpdir.join("test.sqlite3")) con = database.ConnectDatabase(path_db) od = admin_tools.OperateDatabase() out = od.count_variants(con) assert "An error has occured:" in out
def test_count_variants(demo_db_path): con = database.ConnectDatabase(demo_db_path) od = admin_tools.OperateDatabase() out = od.count_variants(con) assert out is not None assert out == 3
def test_print_db_error(tmpdir): path_db = str(tmpdir.join("test.sqlite3")) conn = database.ConnectDatabase(path_db) od = admin_tools.OperateDatabase() out = od.print_db(conn) assert "An error has occured:" in out