mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
[F102] make project_id mandatory on pr_target (close cross-repo pr_number collision)
This commit is contained in:
@@ -377,7 +377,7 @@ async def test_pr_target_returns_base_ref() -> None:
|
||||
_patch_project_service(fake_project),
|
||||
patch("roboco.services.git.httpx.AsyncClient", return_value=fake_client),
|
||||
):
|
||||
out = await svc.pr_target(42)
|
||||
out = await svc.pr_target(42, project_id=project_id)
|
||||
assert out == "feature/parent"
|
||||
|
||||
|
||||
@@ -387,7 +387,7 @@ async def test_pr_target_raises_when_pr_not_found() -> None:
|
||||
result.scalar_one_or_none.return_value = None
|
||||
svc = _service(execute_returns=result)
|
||||
with pytest.raises(NotFoundError):
|
||||
await svc.pr_target(99)
|
||||
await svc.pr_target(99, project_id=uuid4())
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user