Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/tuleap/tests/test_lister.py
Show First 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | def tuleap_repo_3(datadir) -> Tuple[str, Dict[str, str], List[RepoPage], List[str]]: | ||||
for r in reps["repositories"]: | for r in reps["repositories"]: | ||||
page_results.append( | page_results.append( | ||||
TuleapLister.results_simplified(url=TULEAP_URL, repo_type="git", repo=r) | TuleapLister.results_simplified(url=TULEAP_URL, repo_type="git", repo=r) | ||||
) | ) | ||||
origin_urls = [r["uri"] for r in page_results] | origin_urls = [r["uri"] for r in page_results] | ||||
return text, headers, page_results, origin_urls | return text, headers, page_results, origin_urls | ||||
@pytest.fixture(autouse=True) | |||||
def retry_sleep_mock(mocker): | |||||
mocker.patch.object(TuleapLister.page_request.retry, "sleep") | |||||
def check_listed_origins(lister_urls: List[str], scheduler_origins: List[ListedOrigin]): | def check_listed_origins(lister_urls: List[str], scheduler_origins: List[ListedOrigin]): | ||||
"""Asserts that the two collections have the same origin URLs. | """Asserts that the two collections have the same origin URLs. | ||||
Does not test last_update.""" | Does not test last_update.""" | ||||
assert set(lister_urls) == {origin.url for origin in scheduler_origins} | assert set(lister_urls) == {origin.url for origin in scheduler_origins} | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |