Skip to content

Commit

Permalink
corrects test fixed by upstream pr;
Browse files Browse the repository at this point in the history
calculates count using new count decorator
  • Loading branch information
btylerburton committed Feb 12, 2025
1 parent c95296d commit fb1e624
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
6 changes: 3 additions & 3 deletions app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,11 +475,11 @@ def add_harvest_source():
@mod.route("/harvest_source/<source_id>", methods=["GET"])
def view_harvest_source_data(source_id: str):
source = db.get_harvest_source(source_id)
records = db.get_latest_harvest_records_by_source(
source_id=source.id,
records_count = db.get_latest_harvest_records_by_source_orm(
source_id=source.id, count=True
)
summary_data = {
"records_count": len(records),
"records_count": records_count,
"last_job_errors": "N/A",
"last_job_finished": "N/A",
"next_job_scheduled": "N/A",
Expand Down
12 changes: 6 additions & 6 deletions tests/badges/integration/tests.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_multiple_harvest_jobs(
count=True,
)

assert len(records_from_db) == records_from_db_count == 7
assert len(records_from_db) == records_from_db_count == 3

@patch("harvester.harvest.ckan")
@patch("harvester.harvest.download_file")
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/test_pagination.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from unittest.mock import patch

from app.paginate import Pagination
from database.interface import PAGINATE_ENTRIES_PER_PAGE

Expand Down

1 comment on commit fb1e624

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Title Coverage Tests Skipped Failures Errors Time
Unit tests Coverage 39 0 💤 0 ❌ 0 🔥 1.033s ⏱️
Integration Tests Coverage 74 0 💤 0 ❌ 0 🔥 4.61s ⏱️
Functional Tests Coverage 2 0 💤 0 ❌ 0 🔥 7.268s ⏱️

Please sign in to comment.