Example #1
0
 def test_matching_record_not_filtering_self(self):
     kennel = KennelDataModel(self.kennel_id,
                              name=self.name,
                              acronym=self.acronym)
     kennel.save()
     self.assertListEqual(KennelDataModel.matching_records(kennel, False),
                          [kennel])
Example #2
0
 def test_matching_records_multiple_close_matches(self):
     KennelDataModel(self.kennel_id, name=self.name,
                     acronym=self.acronym).save()
     kennel = KennelDataModel('different_id',
                              name='Thinking Kennel',
                              acronym=self.acronym)
     kennel.save()
     KennelDataModel('different_id_2',
                     name='Throwing Kennel',
                     acronym=self.acronym).save()
     match = KennelDataModel('match_kennel',
                             name='Thinking Kennel',
                             acronym=self.acronym)
     x = KennelDataModel.matching_records(match)
     self.assertListEqual(x, [kennel])
Example #3
0
 def test_matching_records_does_not_exist(self):
     kennel = KennelDataModel(self.kennel_id,
                              name=self.name,
                              acronym=self.acronym)
     self.assertListEqual(KennelDataModel.matching_records(kennel), list())