mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
pashub_job_id extracts job ID from all valid PasHub link shapes 🟩
This commit is contained in:
parent
5677789919
commit
ecd2676c5e
1 changed files with 11 additions and 0 deletions
|
|
@ -9,6 +9,17 @@ def make_request(pashub_link: str) -> PashubToAraTriggerRequest:
|
|||
return PashubToAraTriggerRequest(pashub_link=pashub_link)
|
||||
|
||||
|
||||
def test_pashub_job_id_extracts_id_from_details_link() -> None:
|
||||
# Arrange
|
||||
request = make_request("https://pashub.net/jobs/job-id-123/details")
|
||||
|
||||
# Act
|
||||
result = request.pashub_job_id
|
||||
|
||||
# Assert
|
||||
assert result == "job-id-123"
|
||||
|
||||
|
||||
def test_pashub_job_id_raises_for_invalid_link() -> None:
|
||||
# Arrange
|
||||
request = make_request("https://pashub.net/rcs-dashboard")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue