diff options
Diffstat (limited to 'src/test/test_hydrilla_builder.py')
-rw-r--r-- | src/test/test_hydrilla_builder.py | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/test/test_hydrilla_builder.py b/src/test/test_hydrilla_builder.py index 041a3f6..26ede09 100644 --- a/src/test/test_hydrilla_builder.py +++ b/src/test/test_hydrilla_builder.py @@ -17,10 +17,15 @@ from typing import Callable, Optional, Iterable from jsonschema import ValidationError from hydrilla import util as hydrilla_util -from hydrilla.builder import build +from hydrilla.builder import build, _version here = Path(__file__).resolve().parent +expected_generated_by = { + 'name': 'hydrilla.builder', + 'version': _version.version +} + default_srcdir = here / 'source-package-example' default_js_filenames = ['bye.js', 'hello.js', 'message.js'] @@ -57,7 +62,7 @@ class CaseSettings: self.contents = default_contents.copy() self.expected_resources = [{ - 'api_schema_version': [1, 0, 1], + 'api_schema_version': [1], 'source_name': 'hello', 'source_copyright': [{ 'file': 'report.spdx', @@ -80,9 +85,10 @@ class CaseSettings: }, { 'file': 'bye.js', 'sha256': self.sha256_hashes['bye.js'] - }] + }], + 'generated_by': expected_generated_by }, { - 'api_schema_version': [1, 0, 1], + 'api_schema_version': [1], 'source_name': 'hello', 'source_copyright': [{ 'file': 'report.spdx', @@ -102,10 +108,11 @@ class CaseSettings: 'scripts': [{ 'file': 'message.js', 'sha256': self.sha256_hashes['message.js'] - }] + }], + 'generated_by': expected_generated_by }] self.expected_mapping = { - 'api_schema_version': [1, 0, 1], + 'api_schema_version': [1], 'source_name': 'hello', 'source_copyright': [{ 'file': 'report.spdx', @@ -127,10 +134,11 @@ class CaseSettings: 'https://hachettebugs.koszko.org/***': { 'identifier': 'helloapple' } - } + }, + 'generated_by': expected_generated_by } self.expected_source_description = { - 'api_schema_version': [1, 0, 1], + 'api_schema_version': [1], 'source_name': 'hello', 'source_copyright': [{ 'file': 'report.spdx', @@ -160,7 +168,8 @@ class CaseSettings: 'identifier': 'helloapple', 'long_name': 'Hello Apple', 'version': [2021, 11, 10], - }] + }], + 'generated_by': expected_generated_by } def expected(self) -> list[dict]: |