Added support for project-name

Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
2022-08-04 16:52:43 +02:00
parent 0e1d535ba0
commit de67130fd5
6 changed files with 56 additions and 10 deletions

View File

@@ -168,12 +168,12 @@ def test_repo_path_by_url(cloner_dir_struct: Path, path_repo_base: Path):
assert x == ds.repos_dir.joinpath("namespace_repo_3375634822.git").as_posix()
def test__main_repo_path(cloner_dir_struct: Path, path_repo_base: Path):
def test_main_repo_path(cloner_dir_struct: Path, path_repo_base: Path):
ds = MockDirStruct(cloner_dir_struct)
ds.config.cloner_repo_url = path_repo_base.as_uri()
hashed = gen_repo_hashed_name(path_repo_base.as_uri())
c = Cloner(ds)
x = c._Cloner__main_repo_path
x = c.main_repo_path
assert x == ds.repos_dir.joinpath(hashed).as_posix()

View File

@@ -21,11 +21,11 @@ def det_dict():
@pytest.fixture
def det(det_dict):
return DetectedCommit(det_dict)
return DetectedCommit(det_dict, "wut")
def test_detected_commit_dict(det_dict):
det = DetectedCommit(det_dict)
det = DetectedCommit(det_dict, "wut")
assert det.dict == det_dict