parent
4ca84310eb
commit
fc2bd1e937
4 changed files with 4 additions and 4 deletions
|
@ -96,7 +96,7 @@ def test_lister_gitlab_heptapod(datadir, swh_scheduler, requests_mock):
|
|||
def gitlab_page_response(datadir, instance: str, id_after: int) -> List[Dict]:
|
||||
"""Return list of repositories (out of test dataset)"""
|
||||
datapath = Path(datadir, f"https_{instance}", f"api_response_page{id_after}.json")
|
||||
return json.loads(datapath.read_text()) if datapath.exists else []
|
||||
return json.loads(datapath.read_text()) if datapath.exists() else []
|
||||
|
||||
|
||||
def test_lister_gitlab_with_pages(swh_scheduler, requests_mock, datadir):
|
||||
|
|
|
@ -58,7 +58,7 @@ class MavenLister(Lister[MavenListerState, RepoPage]):
|
|||
self,
|
||||
scheduler: SchedulerInterface,
|
||||
url: str,
|
||||
index_url: str = None,
|
||||
index_url: str,
|
||||
instance: Optional[str] = None,
|
||||
credentials: CredentialsType = None,
|
||||
max_origins_per_page: Optional[int] = None,
|
||||
|
|
|
@ -44,7 +44,7 @@ SOURCES = {
|
|||
def page_response(datadir, instance: str = "success") -> List[Dict]:
|
||||
"""Return list of repositories (out of test dataset)"""
|
||||
datapath = Path(datadir, f"sources-{instance}.json")
|
||||
return json.loads(datapath.read_text()) if datapath.exists else []
|
||||
return json.loads(datapath.read_text()) if datapath.exists() else []
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -38,7 +38,7 @@ commands =
|
|||
extras =
|
||||
testing
|
||||
deps =
|
||||
mypy==0.942
|
||||
mypy==1.0.1
|
||||
commands =
|
||||
mypy swh
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue