Skip to content

Commit 415503c

Browse files
committed
Fix failing test
1 parent f957118 commit 415503c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/test_verify.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,20 @@ def test_verify_index_ok(verify_with, tmp_path, assert_log):
147147
def test_verify_index_wrong(verify_with, tmp_path, assert_log):
148148
# Certs exist and verify, but don't match required settings
149149
from manage.urlutils import IndexDownloader
150+
from manage.exceptions import InvalidFeedError
150151
cmd = MockConfig()
151152
for src, dest in [(TESTDATA / n, tmp_path / n) for n in INDEX_NAMES]:
152153
shutil.copy2(src, dest)
153154
shutil.copy2(TEST_CAT, dest.with_suffix(".json.cat"))
154155
cmd.source_settings[dest.as_uri()] = verify_with
155156

156157
idx = IndexDownloader(cmd, (tmp_path / INDEX_NAMES[0]).as_uri(), MockIndex)
157-
indexes = list(idx)
158-
assert [Path(i.url).name for i in indexes] == INDEX_NAMES
158+
with pytest.raises(InvalidFeedError):
159+
indexes = list(idx)
160+
assert_log(
161+
"Fetching.+",
162+
"The signature for %s could not be verified.",
163+
)
159164

160165

161166
@pytest.mark.parametrize("verify_with, expect_fail", [

0 commit comments

Comments
 (0)