diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2021-01-10 11:33:37 +0100 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2021-01-10 11:33:37 +0100 |
commit | 98a1295f76677ffffb640dfb534c398da1265e9e (patch) | |
tree | 045bb1b557a4641615583882995d8d520f4b3fde /tests | |
parent | 1b51ac55d3863e2800d3eabddef7e861c49d5d62 (diff) |
Testing indexing entries with ' in the string/text fields
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/complex/items/8e9fa1ed3c1b4a30a6be7a98eda0cfa7.yaml | 11 | ||||
-rw-r--r-- | tests/test_collection.py | 3 |
2 files changed, 13 insertions, 1 deletions
diff --git a/tests/data/complex/items/8e9fa1ed3c1b4a30a6be7a98eda0cfa7.yaml b/tests/data/complex/items/8e9fa1ed3c1b4a30a6be7a98eda0cfa7.yaml new file mode 100644 index 0000000..e210cdf --- /dev/null +++ b/tests/data/complex/items/8e9fa1ed3c1b4a30a6be7a98eda0cfa7.yaml @@ -0,0 +1,11 @@ +name: "An item with a ' in the name" +description: | + This is an item with ' inside the strings. +position: 'Somewhere' +something: +tags: + - the ' +keywords: [] +exists: +with_default: 'default value' +amount: 0 diff --git a/tests/test_collection.py b/tests/test_collection.py index 850ac27..4668096 100644 --- a/tests/test_collection.py +++ b/tests/test_collection.py @@ -279,7 +279,8 @@ class testComplexCollection(unittest.TestCase): self.assertEqual(len(self.collection.indexed_fields), 7) def test_index(self): - self.collection.update_cache() + indexed = self.collection.update_cache() + self.assertEqual(indexed, 9) def test_indexing_list(self): self.collection.update_cache(['73097121f1874a6ea2f927db7dc4f11e.yaml']) |