Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nothingface0 committed Aug 30, 2023
1 parent d2d3d70 commit 4fbf190
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,18 @@ def testing_database():


def test_db_1(testing_database):
print("Check DQM2MirrorDB.get_rev()")
print("Check DQM2MirrorDB.get_latest_revision()")
revs = [
6001382,
7912099,
2730841,
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)
]
)
Expand Down

0 comments on commit 4fbf190

Please sign in to comment.