Пример #1
0
 def test_hold_match_external_id(self):
     db_hold = entities.Hold.new_with_defaults(external_id=_EXTERNAL_ID)
     ingested_hold = entities.Hold.new_with_defaults(
         external_id=_EXTERNAL_ID)
     self.assertTrue(
         county_matching_utils.is_hold_match(db_entity=db_hold,
                                             ingested_entity=ingested_hold))
     ingested_hold.external_id = _EXTERNAL_ID_OTHER
     self.assertFalse(
         county_matching_utils.is_hold_match(db_entity=db_hold,
                                             ingested_entity=ingested_hold))
Пример #2
0
 def test_hold_match(self):
     db_hold = entities.Hold.new_with_defaults(
         hold_id=_HOLD_ID, jurisdiction_name=_PLACE_1)
     ingested_hold = entities.Hold.new_with_defaults(
         jurisdiction_name=_PLACE_1)
     self.assertTrue(
         county_matching_utils.is_hold_match(db_entity=db_hold,
                                             ingested_entity=ingested_hold))
     ingested_hold.jurisdiction_name = _PLACE_2
     self.assertFalse(
         county_matching_utils.is_hold_match(db_entity=db_hold,
                                             ingested_entity=ingested_hold))