diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-01-10 23:38:56 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-01-10 23:38:56 +0100 |
commit | 19304cd1ae4e4ba4f6dcf4f1db14de1e4e70c250 (patch) | |
tree | 2e7e6f904ad16f9402827a7bc215a419de5c2656 /test/unit/test_item_list.py | |
parent | 38650a8102fe0841617cd80f3a6e45b1f5f62fd5 (diff) | |
download | browser-extension-19304cd1ae4e4ba4f6dcf4f1db14de1e4e70c250.tar.gz browser-extension-19304cd1ae4e4ba4f6dcf4f1db14de1e4e70c250.zip |
improve item list styling; add payload creation form; exend dialog mechanism
Diffstat (limited to 'test/unit/test_item_list.py')
-rw-r--r-- | test/unit/test_item_list.py | 42 |
1 files changed, 21 insertions, 21 deletions
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) |