def update_index(self, which_indexing):
     #setup new indexing
     if 'new' in which_indexing:
         indexing.update_index_properties(self)
     # setup old indexing
     if 'old' in which_indexing:
         prefix.update_prefix_properties(self)
Esempio n. 2
0
 def test_update_prefix_properties(self):
     prefix.add_prefix_properties(TestPerson, 'name')
     test_person = TestPerson(name='John')
     prefix.update_prefix_properties(test_person)
     assert test_person.name_n_ == 'JOHN'
     assert test_person.name_n1_ == 'J'
     assert test_person.name_n2_ == 'JO'
Esempio n. 3
0
 def test_update_prefix_properties(self):
   prefix.add_prefix_properties(TestPerson, 'name')
   test_person = TestPerson(name='John')
   prefix.update_prefix_properties(test_person)
   self.assertEqual(getattr(test_person, 'name_n_'), 'JOHN')
   self.assertEqual(getattr(test_person, 'name_n1_'), 'J')
   self.assertEqual(getattr(test_person, 'name_n2_'), 'JO')
Esempio n. 4
0
 def update_index(self, which_indexing):
     #setup new indexing
     if 'new' in which_indexing:
         indexing.update_index_properties(self)
     # setup old indexing
     if 'old' in which_indexing:
         prefix.update_prefix_properties(self)
Esempio n. 5
0
 def test_update_prefix_properties(self):
     prefix.add_prefix_properties(TestPerson, 'name')
     test_person = TestPerson(name='John')
     prefix.update_prefix_properties(test_person)
     assert test_person.name_n_ == 'JOHN'
     assert test_person.name_n1_ == 'J'
     assert test_person.name_n2_ == 'JO'
Esempio n. 6
0
 def update_index(self, which_indexing):
     #setup new indexing
     if 'new' in which_indexing:
         indexing.update_index_properties(self)
         if config.get('enable_fulltext_search'):
             full_text_search.add_record_to_index(self)
     # setup old indexing
     if 'old' in which_indexing:
         prefix.update_prefix_properties(self)
Esempio n. 7
0
 def update_index(self, which_indexing):
     #setup new indexing
     if 'new' in which_indexing:
         indexing.update_index_properties(self)
         if config.get('enable_fulltext_search'):
             full_text_search.add_record_to_index(self)
     # setup old indexing
     if 'old' in which_indexing:
         prefix.update_prefix_properties(self)
Esempio n. 8
0
 def update_index(self, which_indexing):
     #setup new indexing
     if 'new' in which_indexing:
         indexing.update_index_properties(self)
     # setup old indexing
     if 'old' in which_indexing:
         prefix.update_prefix_properties(self)
     # index for full text search
     self.index()