From 4fbf1905d982e71df27ef24bfbffe7f8a3d916f9 Mon Sep 17 00:00:00 2001 From: Dimitris Papagiannis Date: Wed, 30 Aug 2023 19:09:37 +0200 Subject: [PATCH] Fix tests --- db.py | 4 +++- tests/test_1.py | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/db.py b/db.py index b8e8a1d..ce099b0 100644 --- a/db.py +++ b/db.py @@ -542,7 +542,9 @@ def get_clients(self, run_start: int, run_end: int) -> list: return answer def update_min_max(self, new_min: int, new_max: int): - """update metadata table with info about min and max run number in runs table for fast fetch""" + """ + update metadata table with info about min and max run number in runs table for fast fetch + """ with self.engine.connect() as cur: session = self.Session(bind=cur) try: diff --git a/tests/test_1.py b/tests/test_1.py index 00fe599..b5ef639 100644 --- a/tests/test_1.py +++ b/tests/test_1.py @@ -94,7 +94,7 @@ def testing_database(): def test_db_1(testing_database): - print("Check DQM2MirrorDB.get_rev()") + print("Check DQM2MirrorDB.get_latest_revision()") revs = [ 6001382, 7912099, @@ -102,10 +102,10 @@ def test_db_1(testing_database): 2762604, 12811635, ] - revs = [testing_database.get_rev(host) for host in pytest.production] + revs = [testing_database.get_latest_revision(host) for host in pytest.production] assert all( [ - testing_database.get_rev(host) == rev + testing_database.get_latest_revision(host) == rev for host, rev in zip(pytest.production, revs) ] )