Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/nixguix/tests/test_lister.py
| Show First 20 Lines • Show All 205 Lines • ▼ Show 20 Lines | for artifact in response["sources"]: | ||||
| elif artifact_type == "url": | elif artifact_type == "url": | ||||
| url = artifact["urls"][0] | url = artifact["urls"][0] | ||||
| if url.endswith(".git"): | if url.endswith(".git"): | ||||
| expected_visit_types["git"] += 1 | expected_visit_types["git"] += 1 | ||||
| elif url.endswith(".c") or url.endswith(".txt"): | elif url.endswith(".c") or url.endswith(".txt"): | ||||
| expected_visit_types["content"] += 1 | expected_visit_types["content"] += 1 | ||||
| elif url.startswith("svn"): # mistyped artifact rendered as vcs nonetheless | elif url.startswith("svn"): # mistyped artifact rendered as vcs nonetheless | ||||
| expected_visit_types["svn"] += 1 | expected_visit_types["svn"] += 1 | ||||
| else: | else: # tarball artifacts | ||||
anlambert: `real tarball artifact` seems a better comment imho | |||||
Done Inline Actionsright! fwiw, i'm looking at adding support to all those new zip archives. ardumont: right!
fwiw, i'm looking at adding support to all those new zip archives.
I'm actually… | |||||
Done Inline Actionsyes the tarball module use mime type as last resort so it should detect zip files with different extensions. anlambert: yes the tarball module use mime type as last resort so it should detect zip files with… | |||||
Done Inline Actionsardumont: You seem to imply that [1] is actually not needed, do you concur?
That'd be nice.
[1] D8758 | |||||
Done Inline ActionsYou can keep the exception for war files I think but you can remove the other ones yes. anlambert: You can keep the exception for war files I think but you can remove the other ones yes. | |||||
Done Inline Actionsyes, thx done in the other diff ;) ardumont: yes, thx done in the other diff ;) | |||||
| expected_visit_types["directory"] += 1 | expected_visit_types["directory"] += 1 | ||||
| assert set(expected_visit_types.keys()) == { | assert set(expected_visit_types.keys()) == { | ||||
| "content", | "content", | ||||
| "git", | "git", | ||||
| "svn", | "svn", | ||||
| "hg", | "hg", | ||||
| "directory", | "directory", | ||||
| ▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines | |||||
real tarball artifact seems a better comment imho