def test_constant_keyword_fallback(self): field = { 'field_details': { 'name': 'myfield', 'type': 'constant_keyword' } } oss.perform_fallback(field) self.assertEqual('keyword', field['field_details']['type'])
def test_basic_without_fallback(self): field = {'field_details': {'name': 'myfield', 'type': 'histogram'}} oss.perform_fallback(field) self.assertEqual('histogram', field['field_details']['type'])
def test_version_fallback(self): field = {'field_details': {'name': 'myfield', 'type': 'version'}} oss.perform_fallback(field) self.assertEqual('keyword', field['field_details']['type'])
def test_oss_no_fallback_needed(self): field = {'field_details': {'name': 'myfield', 'type': 'keyword'}} oss.perform_fallback(field) self.assertEqual('keyword', field['field_details']['type'])