aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_item_list.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/test_item_list.py')
-rw-r--r--test/unit/test_item_list.py42
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)