Ejemplo n.º 1
0
 def test_sentence_match_external_ids(self):
     db_sentence = entities.Sentence.new_with_defaults(
         external_id=_EXTERNAL_ID, booking_id=_BOOKING_ID)
     ingested_sentence = entities.Sentence.new_with_defaults(
         external_id=_EXTERNAL_ID)
     self.assertTrue(county_matching_utils.is_sentence_match(
         db_entity=db_sentence, ingested_entity=ingested_sentence))
     ingested_sentence.external_id = _EXTERNAL_ID_OTHER
     self.assertFalse(county_matching_utils.is_sentence_match(
         db_entity=db_sentence, ingested_entity=ingested_sentence))
Ejemplo n.º 2
0
 def test_sentence_match(self):
     # TODO(350): expand tests after more robust equality function
     self.assertTrue(county_matching_utils.is_sentence_match(
         db_entity=entities.Sentence.new_with_defaults(
             sentence_id=_SENTENCE_ID, booking_id=_BOOKING_ID),
         ingested_entity=entities.Sentence.new_with_defaults(
             sentence_id=_SENTENCE_ID_OTHER)))