def test_rule_identifier_includes_structure(self): r1 = models.Rule(text_file=self.create_test_file('Some text'), license_choice=False) r2 = models.Rule(text_file=self.create_test_file('Some text'), license_choice=True) assert models.rule_identifier(r1) != models.rule_identifier(r2)
def test_rule_identifier_ignores_small_text_differences(self): r1 = models.Rule(text_file=self.create_test_file('Some text'), template=False) r2 = models.Rule(text_file=self.create_test_file(' some \n text '), template=False) assert models.rule_identifier(r1) == models.rule_identifier(r2)
def test_rule_identifier_includes_rule_type(self): r1 = models.Rule(text_file=self.create_test_file('Some text'), template=True) r2 = models.Rule(text_file=self.create_test_file('Some text'), template=False) assert models.rule_identifier(r1) != models.rule_identifier(r2)