示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 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)
示例#4
0
 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)
示例#5
0
 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)
示例#6
0
 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)