Revision 92fc67cf
Added by koszko over 1 year ago
test/unit/test_item_list.py | ||
---|---|---|
104 | 104 |
items.reverse() |
105 | 105 |
|
106 | 106 |
sample_data = { |
107 |
'resources': {},
|
|
108 |
'mappings': {},
|
|
107 |
'resource': {}, |
|
108 |
'mapping': {}, |
|
109 | 109 |
'file': { |
110 | 110 |
'sha256': sample_files_by_sha256 |
111 | 111 |
} |
... | ... | |
127 | 127 |
it['long_name'] = f'somewhat renamed {it["long_name"]}' |
128 | 128 |
|
129 | 129 |
items_to_inclue = [items[i] for i in sorted(to_include)] |
130 |
sample_data[item_type + 's'] = sample_data_dict(items_to_inclue)
|
|
130 |
sample_data[item_type] = sample_data_dict(items_to_inclue) |
|
131 | 131 |
execute_in_page('returnval(haketilodb.save_items(arguments[0]));', |
132 | 132 |
sample_data) |
133 | 133 |
|
134 | 134 |
extra_item['long_name'] = f'{iteration} {extra_item["long_name"]}' |
135 |
sample_data[item_type + 's'] = sample_data_dict([extra_item])
|
|
135 |
sample_data[item_type] = sample_data_dict([extra_item]) |
|
136 | 136 |
execute_in_page('returnval(haketilodb.save_items(arguments[0]));', |
137 | 137 |
sample_data) |
138 | 138 |
|
... | ... | |
189 | 189 |
items = [make_item(item_type, f'item{i}', f'Item {i}') for i in range(3)] |
190 | 190 |
|
191 | 191 |
sample_data = { |
192 |
'resources': {},
|
|
193 |
'mappings': {},
|
|
192 |
'resource': {}, |
|
193 |
'mapping': {}, |
|
194 | 194 |
'file': { |
195 | 195 |
'sha256': sample_files_by_sha256 |
196 | 196 |
} |
197 | 197 |
} |
198 |
sample_data[item_type + 's'] = sample_data_dict(items)
|
|
198 |
sample_data[item_type] = sample_data_dict(items) |
|
199 | 199 |
|
200 | 200 |
preview_container, dialog_container, ul = execute_in_page( |
201 | 201 |
f''' |
Also available in: Unified diff
change store names and data keys to singular