fix test error

This commit is contained in:
David Dalcino
2021-09-16 22:09:38 -07:00
parent 78ae876d9d
commit 49cde4ee30
2 changed files with 2 additions and 2 deletions

View File

@@ -699,7 +699,7 @@ class MetadataFactory:
raise CliInputError(f"The requested modules were not located: {not_found}")
csv_lists = [mod["DownloadableArchives"] for mod in mod_metadata.values()]
return sorted([arc.split("-")[0] for csv in csv_lists for arc in csv.split(", ")])
return sorted(set([arc.split("-")[0] for csv in csv_lists for arc in csv.split(", ")]))
def describe_filters(self) -> str:
if self.spec is None:

View File

@@ -244,7 +244,7 @@ def test_list_archives(
with pytest.raises(CliInputError) as err:
MetadataFactory(archive_id, archives_query=archives_query).getList()
assert err.type == CliInputError
assert format(err.value) == expected_err_msg
assert format(err.value).startswith(expected_err_msg)
cli = Cli()
assert 1 == cli.run(cli_args)