Skip to content
Snippets Groups Projects
Commit bd042966 authored by Valentin Rigal's avatar Valentin Rigal
Browse files

ESElement dumb test

parent b25e5792
No related branches found
No related tags found
No related merge requests found
......@@ -37,3 +37,9 @@ class TestESDocuments(FixtureAPITestCase):
get_dates_mock.return_value = [InterpretedDate(1666, 2, 3), ]
date_range = ESElement.from_model(element).to_dict().get('date_range')
self.assertDictEqual(date_range, {'gte': '1666-02-03', 'lt': '1666-02-03||+1d'})
def test_index_structural_metadata(self):
element = self.corpus.elements.get(name='Volume 1')
element.metadatas.create(type=MetaType.Structural, name='ref.', value='123ABC')
es_document = ESElement.from_model(element)
self.assertCountEqual(es_document.structural_metadata, ['123ABC'])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment