diff --git a/tests/test_1.py b/tests/test_1.py index 57944e6..8a34935 100644 --- a/tests/test_1.py +++ b/tests/test_1.py @@ -93,7 +93,7 @@ def testing_database(): ] -def test_db_1(testing_database): +def test_db_1(testing_database: DQM2MirrorDB): print("Check DQM2MirrorDB.get_latest_revision()") revs = [ 6001382, @@ -111,7 +111,7 @@ def test_db_1(testing_database): ) -def test_db_2(testing_database): +def test_db_2(testing_database: DQM2MirrorDB): print("Check DQM2MirrorDB.get_runs_around()") test_runs = [358788, 358791, 358792] truth_answers = [ @@ -130,7 +130,7 @@ def test_db_2(testing_database): assert all(answers) -def test_db_3(testing_database): +def test_db_3(testing_database: DQM2MirrorDB): print("Check DQM2MirrorDB.get_logs()") test_ids = [ "dqm-source-state-run358788-hostfu-c2f11-11-04-pid041551", @@ -153,13 +153,13 @@ def test_db_3(testing_database): assert logs[0] == truth and logs[1] == truth -def test_db_4(testing_database): +def test_db_4(testing_database: DQM2MirrorDB): print("Check DQM2MirrorDB.get_info()") minmax = testing_database.get_info() assert minmax[0] == 358788 and minmax[1] == 358792 -def test_db_5(testing_database): +def test_db_5(testing_database: DQM2MirrorDB): print("Check DQM2MirrorDB.update_min_max() & DQM2MirrorDB.get_info()") testing_database.update_min_max(350000, 360000) minmax = testing_database.get_info() @@ -167,7 +167,7 @@ def test_db_5(testing_database): assert minmax[0] == 350000 and minmax[1] == 360000 -def test_db_6(testing_database): +def test_db_6(testing_database: DQM2MirrorDB): print("Check DQM2MirrorDB.get_clients()") clients_truth = [ "beam", @@ -207,14 +207,15 @@ def test_db_6(testing_database): assert all([c1 == c2 for c1, c2 in zip(clients, clients_truth)]) -def test_db_7(testing_database): +def test_db_7(testing_database: DQM2MirrorDB): print("Check DQM2MirrorDB.get_timeline_data()") truth = TEST_DB_7_TRUTH answer = json.dumps(testing_database.get_timeline_data(358791, 358791)) + print("ANSWER\n\n", answer) assert truth == answer -def test_db_8(testing_database): +def test_db_8(testing_database: DQM2MirrorDB): print("Check DQM2MirrorDB.get_mirror_data()") truth = "''''(),11112223333333334445566899999________ccimnorsu" # Literally WTF answer = testing_database.get_mirror_data(358788)[0] @@ -222,7 +223,7 @@ def test_db_8(testing_database): assert truth == answer -def test_db_9(testing_database): +def test_db_9(testing_database: DQM2MirrorDB): print("Check DQM2MirrorDB.get_graphs_data()") truth = TEST_DB_9_TRUTH answer = testing_database.get_graphs_data(358792) @@ -237,7 +238,7 @@ def test_db_9(testing_database): assert item == answer[i] -def test_db_10(testing_database): +def test_db_10(testing_database: DQM2MirrorDB): print("Check DQM2MirrorDB.fill_graph()") truth = [ 123456, @@ -255,7 +256,7 @@ def test_db_10(testing_database): assert all([c1 == c2 for c1, c2 in zip(truth, answer)]) -def test_db_11(testing_database): +def test_db_11(testing_database: DQM2MirrorDB): print("Check DQM2MirrorDB.fill_run() & get()") truth = ( "id",