summaryrefslogtreecommitdiff
path: root/test/world_wide_library.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-02-09 17:09:13 +0100
committerWojtek Kosior <koszko@koszko.org>2022-02-09 18:00:16 +0100
commit1c65dd5ca24052ccf9a92939eecd0966c9635c50 (patch)
tree7575157ccd729b4ad79f6c04501023ccb0532a63 /test/world_wide_library.py
parent830d22d8931a4e5f0606d401f24d7cd937f8697e (diff)
downloadbrowser-extension-1c65dd5ca24052ccf9a92939eecd0966c9635c50.tar.gz
browser-extension-1c65dd5ca24052ccf9a92939eecd0966c9635c50.zip
adapt to changes in file path format
From now on we assume Hydrilla serves file contents at 'file/sha256/<hash>' instead of 'file/sha256-<hash>'. With this commit we also stop using the "hash_key" property internally.
Diffstat (limited to 'test/world_wide_library.py')
-rw-r--r--test/world_wide_library.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/world_wide_library.py b/test/world_wide_library.py
index b3febd7..04f5e8b 100644
--- a/test/world_wide_library.py
+++ b/test/world_wide_library.py
@@ -114,7 +114,7 @@ sample_contents = [f'Mi povas manĝi vitron, ĝi ne damaĝas min {i}'
for i in range(9)]
sample_hashes = [sha256(c.encode()).digest().hex() for c in sample_contents]
-file_url = lambda hashed: f'https://hydril.la/file/sha256-{hashed}'
+file_url = lambda hashed: f'https://hydril.la/file/sha256/{hashed}'
sample_files_catalog = dict([(file_url(h), make_handler(c))
for h, c in zip(sample_hashes, sample_contents)])