def test_rule_007(self): oRule = instantiation.rule_007() self.assertTrue(oRule) self.assertEqual(oRule.name, 'instantiation') self.assertEqual(oRule.identifier, '007') dExpected = [utils.add_violation(55)] oRule.analyze(oFilePort) self.assertEqual(oRule.violations, dExpected)
def test_fix_rule_007(self): oRule = instantiation.rule_007() oRule.fix(oFile) oRule.analyze(oFile) self.assertEqual(oRule.violations, [])
def test_rule_007(self): oRule = instantiation.rule_007() self.assertTrue(oRule) self.assertEqual(oRule.name, 'instantiation') self.assertEqual(oRule.identifier, '007') self.assertTrue(oRule.depricated)