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)])
def get_reverse_indexed_cases(self, case_ids): return get_reverse_indexed_cases(self.domain, case_ids)