diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-02-09 17:09:13 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-02-09 18:00:16 +0100 |
commit | 1c65dd5ca24052ccf9a92939eecd0966c9635c50 (patch) | |
tree | 7575157ccd729b4ad79f6c04501023ccb0532a63 /test/unit/test_payload_create.py | |
parent | 830d22d8931a4e5f0606d401f24d7cd937f8697e (diff) | |
download | browser-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/unit/test_payload_create.py')
-rw-r--r-- | test/unit/test_payload_create.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/test_payload_create.py b/test/unit/test_payload_create.py index cee3a9b..9689c37 100644 --- a/test/unit/test_payload_create.py +++ b/test/unit/test_payload_create.py @@ -19,6 +19,8 @@ Haketilo unit tests - using a form to create simple site payload import pytest import re +from hashlib import sha256 + from selenium.webdriver.support.ui import WebDriverWait from ..extension_crafting import ExtraHTML @@ -137,7 +139,7 @@ def test_payload_create_normal_usage(driver, execute_in_page): 'long_name': long_name, 'scripts': [{ 'file': 'payload.js', - 'hash_key': make_hash_key(form_data['script']) + 'sha256': sha256(form_data['script'].encode()).digest().hex() }] }] |