From 19304cd1ae4e4ba4f6dcf4f1db14de1e4e70c250 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Mon, 10 Jan 2022 23:38:56 +0100 Subject: improve item list styling; add payload creation form; exend dialog mechanism --- test/unit/test_item_list.py | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'test/unit/test_item_list.py') diff --git a/test/unit/test_item_list.py b/test/unit/test_item_list.py index e2e1af8..62ec84e 100644 --- a/test/unit/test_item_list.py +++ b/test/unit/test_item_list.py @@ -26,6 +26,27 @@ from .utils import * broker_js = lambda: load_script('background/broadcast_broker.js') + ';start();' +def make_sample_resource(identifier, long_name): + return { + 'source_name': 'hello', + 'source_copyright': [ + sample_file_ref('report.spdx'), + sample_file_ref('LICENSES/CC0-1.0.txt') + ], + 'type': 'resource', + 'identifier': identifier, + 'long_name': long_name, + 'uuid': 'a6754dcb-58d8-4b7a-a245-24fd7ad4cd68', + 'version': [2021, 11, 10], + 'revision': 1, + 'description': 'greets an apple', + 'dependencies': ['hello-message'], + 'scripts': [ + sample_file_ref('hello.js'), + sample_file_ref('bye.js') + ] + } + def make_sample_mapping(identifier, long_name): return { 'source_name': 'example-org-fixes-new', @@ -49,27 +70,6 @@ def make_sample_mapping(identifier, long_name): } } -def make_sample_resource(identifier, long_name): - return { - 'source_name': 'hello', - 'source_copyright': [ - sample_file_ref('report.spdx'), - sample_file_ref('LICENSES/CC0-1.0.txt') - ], - 'type': 'resource', - 'identifier': identifier, - 'long_name': long_name, - 'uuid': 'a6754dcb-58d8-4b7a-a245-24fd7ad4cd68', - 'version': [2021, 11, 10], - 'revision': 1, - 'description': 'greets an apple', - 'dependencies': ['hello-message'], - 'scripts': [ - sample_file_ref('hello.js'), - sample_file_ref('bye.js') - ] - } - def make_item(item_type, *args): return make_sample_resource(*args) if item_type == 'resource' \ else make_sample_mapping(*args) -- cgit v1.2.3