From 1c65dd5ca24052ccf9a92939eecd0966c9635c50 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Wed, 9 Feb 2022 17:09:13 +0100 Subject: adapt to changes in file path format From now on we assume Hydrilla serves file contents at 'file/sha256/' instead of 'file/sha256-'. With this commit we also stop using the "hash_key" property internally. --- test/unit/test_payload_create.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/unit/test_payload_create.py') 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() }] }] -- cgit v1.2.3