|
28 | 28 | MockGithubUrl = PRUrl( |
29 | 29 | full_url="https://github.com/foo/bar/pull/1", |
30 | 30 | repo_path="foo/bar", |
| 31 | + base_url="https://github.com", |
31 | 32 | pr_number=1, |
32 | 33 | source=PRSource.github, |
33 | 34 | ) |
@@ -234,7 +235,7 @@ def test_get_file_contents_single_file() -> None: |
234 | 235 | mock.Mock(decoded_content=b"lorem ipsum dolor sit amet"), |
235 | 236 | ] |
236 | 237 | content = client.get_file_contents( |
237 | | - PRUrl(full_url="https://foo", repo_path="path", pr_number=1, source=PRSource.github), |
| 238 | + PRUrl(full_url="https://foo", base_url="https://foo", repo_path="path", pr_number=1, source=PRSource.github), |
238 | 239 | file_path="important.py", |
239 | 240 | branch_name="source", |
240 | 241 | ) |
@@ -263,7 +264,7 @@ def test_get_file_contents_single_file_multiple_objects() -> None: |
263 | 264 | ] |
264 | 265 | ] |
265 | 266 | content = client.get_file_contents( |
266 | | - PRUrl(full_url="https://foo", repo_path="path", pr_number=1, source=PRSource.github), |
| 267 | + PRUrl(full_url="https://foo", base_url="https://foo", repo_path="path", pr_number=1, source=PRSource.github), |
267 | 268 | file_path="important.py", |
268 | 269 | branch_name="source", |
269 | 270 | ) |
@@ -303,12 +304,12 @@ def test_get_file_contents_one_file_missing() -> None: |
303 | 304 | github.GithubException(status=404, message="Not Found"), # target branch |
304 | 305 | ] |
305 | 306 | content_1 = client.get_file_contents( |
306 | | - PRUrl(full_url="https://foo", repo_path="path", pr_number=1, source=PRSource.github), |
| 307 | + PRUrl(full_url="https://foo", base_url="https://foo", repo_path="path", pr_number=1, source=PRSource.github), |
307 | 308 | file_path="important.py", |
308 | 309 | branch_name="source", |
309 | 310 | ) |
310 | 311 | content_2 = client.get_file_contents( |
311 | | - PRUrl(full_url="https://foo", repo_path="path", pr_number=1, source=PRSource.github), |
| 312 | + PRUrl(full_url="https://foo", base_url="https://foo", repo_path="path", pr_number=1, source=PRSource.github), |
312 | 313 | file_path="logic.py", |
313 | 314 | branch_name="source", |
314 | 315 | ) |
@@ -356,7 +357,7 @@ def test_post_review_successful() -> None: |
356 | 357 | ) |
357 | 358 |
|
358 | 359 | client.publish_review( |
359 | | - PRUrl(full_url="https://foo", repo_path="path", pr_number=1, source=PRSource.github), |
| 360 | + PRUrl(full_url="https://foo", base_url="https://foo", repo_path="path", pr_number=1, source=PRSource.github), |
360 | 361 | fake_review, |
361 | 362 | ) |
362 | 363 |
|
@@ -430,7 +431,7 @@ def test_post_review_fallback_to_single_line() -> None: |
430 | 431 | ] |
431 | 432 |
|
432 | 433 | client.publish_review( |
433 | | - PRUrl(full_url="https://foo", repo_path="path", pr_number=1, source=PRSource.github), |
| 434 | + PRUrl(full_url="https://foo", base_url="https://foo", repo_path="path", pr_number=1, source=PRSource.github), |
434 | 435 | fake_review, |
435 | 436 | ) |
436 | 437 |
|
@@ -487,7 +488,8 @@ def test_publish_guide_successful() -> None: |
487 | 488 | client = mock_github_client(m_repo) |
488 | 489 |
|
489 | 490 | client.publish_guide( |
490 | | - PRUrl(full_url="https://foo", repo_path="path", pr_number=1, source=PRSource.github), FAKE_GUIDE |
| 491 | + PRUrl(full_url="https://foo", base_url="https://foo", repo_path="path", pr_number=1, source=PRSource.github), |
| 492 | + FAKE_GUIDE, |
491 | 493 | ) |
492 | 494 |
|
493 | 495 | assert m_pr.create_review.call_args_list == [ |
|
0 commit comments