Ejemplo n.º 1
0
 def test_bond_match_external_ids(self):
     db_bond = entities.Bond.new_with_defaults(external_id=_EXTERNAL_ID,
                                               booking_id=_BOOKING_ID)
     ingested_bond = entities.Bond.new_with_defaults(
         external_id=_EXTERNAL_ID)
     self.assertTrue(county_matching_utils.is_bond_match(
         db_entity=db_bond, ingested_entity=ingested_bond))
     ingested_bond.external_id = _EXTERNAL_ID_OTHER
     self.assertFalse(county_matching_utils.is_bond_match(
         db_entity=db_bond, ingested_entity=ingested_bond))
Ejemplo n.º 2
0
 def test_bond_match(self):
     db_bond = entities.Bond.new_with_defaults(
         bond_id=_BOND_ID, bond_type_raw_text='CASH', status=BondStatus.SET,
         booking_id=_BOOKING_ID)
     ingested_bond = entities.Bond.new_with_defaults(
         bond_type_raw_text='CASH',
         status=BondStatus.POSTED
     )
     self.assertTrue(county_matching_utils.is_bond_match(
         db_entity=db_bond, ingested_entity=ingested_bond))
     ingested_bond.bond_type_raw_text = 'SECURED'
     self.assertFalse(county_matching_utils.is_bond_match(
         db_entity=db_bond, ingested_entity=ingested_bond))