コード例 #1
0
 def test_legacy_reverse_index(self):
     """Test that cases with indices without a relationship are still returned"""
     self.assertEqual(
         [self.case._id],
         [c._id for c in
          get_reverse_indexed_cases(self.domain, [self.indexed_case_id], relationship=CASE_INDEX_EXTENSION)])
     # remove the relationship and make sure the case is still returned when asking for child indexes
     self._delete_relationship()
     self.assertEqual(
         [self.case._id],
         [c._id for c in get_reverse_indexed_cases(self.domain, [self.indexed_case_id])])
     # make sure it doesn't show up if we are asking for extension indexes
     self.assertEqual(
         [],
         [c._id for c in
          get_reverse_indexed_cases(self.domain, [self.indexed_case_id], CASE_INDEX_EXTENSION)])
コード例 #2
0
 def test_legacy_reverse_index(self):
     """Test that cases with indices without a relationship are still returned"""
     self.assertEqual(
         [self.case._id],
         [c._id for c in
          get_reverse_indexed_cases(self.domain, [self.indexed_case_id], relationship=CASE_INDEX_EXTENSION)])
     # remove the relationship and make sure the case is still returned when asking for child indexes
     self._delete_relationship()
     self.assertEqual(
         [self.case._id],
         [c._id for c in get_reverse_indexed_cases(self.domain, [self.indexed_case_id])])
     # make sure it doesn't show up if we are asking for extension indexes
     self.assertEqual(
         [],
         [c._id for c in
          get_reverse_indexed_cases(self.domain, [self.indexed_case_id], CASE_INDEX_EXTENSION)])
コード例 #3
0
ファイル: casedb.py プロジェクト: saketkanth/commcare-hq
 def get_reverse_indexed_cases(self, case_ids):
     return get_reverse_indexed_cases(self.domain, case_ids)
コード例 #4
0
ファイル: casedb.py プロジェクト: zbidi/commcare-hq
 def get_reverse_indexed_cases(self, case_ids):
     return get_reverse_indexed_cases(self.domain, case_ids)