From a2aca68f63c2e442dc9e103ae31ba0c67d606186 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Mon, 2 Jun 2014 17:31:48 +0200 Subject: ipalib.aci: Fix bugs in comparison - regression in be6edef6e48224e74344f48d25876b09cd263674: The __ne__ special method was named incorrectly - regression in 1ea6def129aa459ecc3d176a3b6aebdf75de2eb7: The targetattr operator was never compared Include some new comparison tests. Reviewed-By: Martin Kosek --- ipalib/aci.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ipalib') diff --git a/ipalib/aci.py b/ipalib/aci.py index cea61a9c4..a55732bf1 100755 --- a/ipalib/aci.py +++ b/ipalib/aci.py @@ -238,8 +238,8 @@ class ACI: if set(self.target.get('targetattr', {}).get('expression', ())) != set(b.target.get('targetattr',{}).get('expression', ())): return False - if self.target.get('targetattr',{}).get('operator') != b.target.get('targetattr',{}).get('operator'): - return False + if self.target.get('targetattr',{}).get('operator') != b.target.get('targetattr',{}).get('operator'): + return False if self.target.get('target',{}).get('expression') != b.target.get('target',{}).get('expression'): return False @@ -255,5 +255,5 @@ class ACI: __eq__ = isequal - def __neq__(self, b): + def __ne__(self, b): return not self == b -- cgit