diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2021-02-03 09:47:25 +0100 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2021-02-03 09:47:25 +0100 |
commit | 48deffbba075a1920947d1879fd6731d6bfc259e (patch) | |
tree | cf165b20a37fde79caf2cde05ae63b3e3328a488 /tests | |
parent | 9ee3f01e454d1d56b5f0a31b30bbc8a5a2f50469 (diff) |
More tests for entries with ' characters
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/complex/items/8e9fa1ed3c1b4a30a6be7a98eda0cfa7.yaml | 3 | ||||
-rw-r--r-- | tests/test_collection.py | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/tests/data/complex/items/8e9fa1ed3c1b4a30a6be7a98eda0cfa7.yaml b/tests/data/complex/items/8e9fa1ed3c1b4a30a6be7a98eda0cfa7.yaml index e210cdf..e23a563 100644 --- a/tests/data/complex/items/8e9fa1ed3c1b4a30a6be7a98eda0cfa7.yaml +++ b/tests/data/complex/items/8e9fa1ed3c1b4a30a6be7a98eda0cfa7.yaml @@ -4,7 +4,8 @@ description: | position: 'Somewhere' something: tags: - - the ' +- the ' +- "'with a ' at the beginning" keywords: [] exists: with_default: 'default value' diff --git a/tests/test_collection.py b/tests/test_collection.py index f7ee31f..b25dfa1 100644 --- a/tests/test_collection.py +++ b/tests/test_collection.py @@ -339,6 +339,13 @@ class testComplexCollection(unittest.TestCase): with open(fname, 'r') as fp: self.assertEqual(e.yaml_data, fp.read()) + def test_data_is_stored_as_written_on_file_with_apices(self): + e = self.collection.entry_from_eid('8e9fa1ed3c1b4a30a6be7a98eda0cfa7') + fname = 'tests/data/complex/items/' + \ + '8e9fa1ed3c1b4a30a6be7a98eda0cfa7.yaml' + with open(fname, 'r') as fp: + self.assertEqual(e.yaml_data, fp.read()) + def test_sorted_search(self): # search in ascending order self.collection.start_search('Amount', sort_by=['amount']) |