|
25 | 25 | id=2,
|
26 | 26 | filename="test_file3.png",
|
27 | 27 | path="test_folder",
|
28 |
| - fields=[{"6": [1001]}, {"4": "description"}], |
| 28 | + fields=[{"6": [1001]}, {"4": "Foo description"}], |
29 | 29 | )
|
30 | 30 | test_entry_four = Entry(
|
31 | 31 | id=3,
|
|
70 | 70 | "tag1 -description | description: desc",
|
71 | 71 | [{key_unbound: ["tag1"], key_empty: ["description"]}, {"description": "desc"}],
|
72 | 72 | ),
|
| 73 | + ("; no author", [{key_unbound: ["no", "author"]}]), |
| 74 | + ("description: Foo", [{"description": "foo"}]) |
73 | 75 | ]
|
74 | 76 |
|
75 | 77 | remap_cases: list[tuple] = [
|
76 | 78 | (test_entry_one, {"tags": [1000, 1001], "author": ["James"]}),
|
77 | 79 | (test_entry_two, {}),
|
78 |
| - (test_entry_three, {"tags": [1001], "description": ["description"]}), |
| 80 | + (test_entry_three, {"tags": [1001], "description": ["Foo description"]}), |
79 | 81 | (test_entry_four, {"author": ["Victor"], "description": ["description"]}),
|
80 | 82 | (test_entry_five, {"author": ["Victor", "James"]}),
|
81 | 83 | ]
|
|
154 | 156 | ],
|
155 | 157 | )
|
156 | 158 |
|
| 159 | +filter_case_six: tuple = ( |
| 160 | + [{"description": "foo"}], |
| 161 | + SearchMode.OR, |
| 162 | + [(ItemType.ENTRY, 2), (ItemType.ENTRY, 5)] |
| 163 | + ) |
| 164 | + |
157 | 165 | negative_filter_case_one: tuple = (
|
158 | 166 | [{key_empty: "description"}],
|
159 | 167 | SearchMode.OR,
|
|
191 | 199 | filter_case_three,
|
192 | 200 | filter_case_four,
|
193 | 201 | filter_case_five,
|
| 202 | + filter_case_six, |
194 | 203 | negative_filter_case_one,
|
195 | 204 | negative_filter_case_two,
|
196 | 205 | negative_filter_case_three,
|
|
0 commit comments