コード例 #1
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)
コード例 #2
0
ファイル: test_prefix.py プロジェクト: Aloknayan/personfinder
 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'
コード例 #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')
コード例 #4
0
ファイル: model.py プロジェクト: pet-finder/pet-finder
 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)
コード例 #5
0
ファイル: test_prefix.py プロジェクト: pet-finder/pet-finder
 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'
コード例 #6
0
ファイル: model.py プロジェクト: drakoleat/personfinder
 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)
コード例 #7
0
ファイル: model.py プロジェクト: Stephanie1125/personfinder
 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)
コード例 #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()