Ejemplo n.º 1
0
    def test_action(self):
        rc = DotDict()
        pc = DotDict()
        processor = None

        support_rule = SupportClassificationRule()
        self.assertTrue(support_rule.action(rc, pc, processor))
Ejemplo n.º 2
0
    def test_action(self):
        rc = DotDict()
        rd = {}
        pc = DotDict()
        processor = None

        support_rule = SupportClassificationRule()
        ok_(support_rule.action(rc, rd, pc, processor))
Ejemplo n.º 3
0
    def test_action(self):
        rc = DotDict()
        rd = {}
        pc = DotDict()
        processor = None

        support_rule = SupportClassificationRule()
        ok_(support_rule.action(rc, rd, pc, processor))
Ejemplo n.º 4
0
    def test_add_classification_to_processed_crash(self):
        pc = DotDict()
        pc.classifications = DotDict()

        support_rule = SupportClassificationRule()
        support_rule._add_classification(pc, 'stupid', 'extra stuff')
        ok_('classifications' in pc)
        ok_('support' in pc.classifications)
        eq_('stupid', pc.classifications.support.classification)
        eq_('extra stuff', pc.classifications.support.classification_data)
        eq_('0.0', pc.classifications.support.classification_version)
Ejemplo n.º 5
0
    def test_predicate(self):
        rc = DotDict()
        pc = DotDict()
        pc.classifications = DotDict()
        processor = None

        support_rule = SupportClassificationRule()
        self.assertTrue(support_rule.predicate(rc, pc, processor))

        pc.classifications.support = DotDict()
        self.assertTrue(support_rule.predicate(rc, pc, processor))
Ejemplo n.º 6
0
    def test_predicate(self):
        rc = DotDict()
        rd = {}
        pc = DotDict()
        pc.classifications = DotDict()
        processor = None

        support_rule = SupportClassificationRule()
        ok_(support_rule.predicate(rc, rd, pc, processor))

        pc.classifications.support = DotDict()
        ok_(support_rule.predicate(rc, rd, pc, processor))
Ejemplo n.º 7
0
    def test_predicate(self):
        rc = DotDict()
        rd = {}
        pc = DotDict()
        pc.classifications = DotDict()
        processor = None

        support_rule = SupportClassificationRule()
        ok_(support_rule.predicate(rc, rd, pc, processor))

        pc.classifications.support = DotDict()
        ok_(support_rule.predicate(rc, rd, pc, processor))
Ejemplo n.º 8
0
    def test_add_classification_to_processed_crash(self):
        pc = DotDict()
        pc.classifications = DotDict()

        support_rule = SupportClassificationRule()
        support_rule._add_classification(
            pc,
            'stupid',
            'extra stuff'
        )
        ok_('classifications' in pc)
        ok_('support' in pc.classifications)
        eq_(
            'stupid',
            pc.classifications.support.classification
        )
        eq_(
            'extra stuff',
            pc.classifications.support.classification_data
        )
        eq_(
            '0.0',
            pc.classifications.support.classification_version
        )
Ejemplo n.º 9
0
 def test_version(self):
     support_rule = SupportClassificationRule()
     eq_(support_rule.version(), '0.0')
Ejemplo n.º 10
0
 def test_version(self):
     support_rule = SupportClassificationRule()
     eq_(support_rule.version(), '0.0')
Ejemplo n.º 11
0
 def test_version(self):
     support_rule = SupportClassificationRule()
     self.assertEqual(support_rule.version(), '0.0')