def test_no_match_family_is_substring(self): product = Product("Nikon_pix_S5100", "Nikon", "S5100", "pix") actual_result = product.calculate_match_quality( "NIKON Coolpix S5100 - rose éclatant") self.assertFalse(actual_result, "Listing should not match.")
def test_valid_match_no_family(self): product = Product("Sony_Cyber-shot_DSC-W310", "Sony", "DSC-W310", None) actual_result = product.calculate_match_quality( "Sony Cyber-shot DSC-W310 - Digital camera - compact - 12.1 Mpix " "- optical zoom: 4 x - supported memory: MS Duo, SD, MS PRO Duo, " "MS PRO Duo Mark2, SDHC, MS PRO-HG Duo - silver") self.assertTrue(actual_result, "Listing should match.")