Skip to content

Commit

Permalink
bug fix; add record status assertion in invalid transform test
Browse files Browse the repository at this point in the history
  • Loading branch information
rshewitt committed Jan 6, 2025
1 parent 53be14b commit 76dcae5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions harvester/harvest.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def external_records_to_id_hash(self, records: list[dict]) -> None:
except Exception as e:
# TODO: do something with 'e'
raise ExtractExternalException(
f"{self.title} {self.url} failed to convert to id:hash",
f"{self.name} {self.url} failed to convert to id:hash",
self.job_id,
)

Expand Down Expand Up @@ -245,7 +245,7 @@ def compare(self) -> None:
except Exception as e:
# TODO: do something with 'e'
raise CompareException(
f"{self.title} {self.url} failed to run compare. exiting.",
f"{self.name} {self.url} failed to run compare. exiting.",
self.job_id,
)

Expand Down
3 changes: 3 additions & 0 deletions tests/integration/harvest/test_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def test_invalid_transform_iso19115_2(
assert len(job_errors) == 1
assert job_errors[0].message == expected_error_msg

record = interface.get_harvest_record(job_errors[0].record.id)
assert record.status == "error"

def test_valid_transform_iso19115_2(
self,
interface,
Expand Down

1 comment on commit 76dcae5

@github-actions
Copy link

Choose a reason for hiding this comment

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

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 7.860s ⏱️

Please sign in to comment.