From 0a694af3ff0939de9f203582bd63317aeb4fa31f Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Sep 16 2017 11:25:20 +0000 Subject: Remove unused init methods from our YAMLObjects. Fixes #78. I removed them here and the tests still pass (functional-tests include). To me, that means they must not be called at all. Cool? --- diff --git a/greenwave/policies.py b/greenwave/policies.py index b95fe03..31497de 100644 --- a/greenwave/policies.py +++ b/greenwave/policies.py @@ -137,9 +137,6 @@ class PassingTestCaseRule(Rule): yaml_tag = u'!PassingTestCaseRule' yaml_loader = yaml.SafeLoader - def __init__(self, test_case_name): - self.test_case_name = test_case_name - def check(self, item, results, waivers): matching_results = [r for r in results if r['testcase']['name'] == self.test_case_name] if not matching_results: @@ -163,12 +160,6 @@ class Policy(yaml.YAMLObject): yaml_tag = u'!Policy' yaml_loader = yaml.SafeLoader - def __init__(self, id, product_versions, decision_context, rules): - self.id = id - self.product_versions = frozenset(product_versions) - self.decision_context = decision_context - self.rules = rules - def applies_to(self, decision_context, product_version): return (decision_context == self.decision_context and product_version in self.product_versions)