summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan KubĂ­k <mkubik@redhat.com>2015-07-27 11:08:46 +0200
committerMartin Basti <mbasti@redhat.com>2015-07-31 15:50:05 +0200
commit3f90aa0c18727f02e5e373ea0b625cfa6edb7a37 (patch)
tree9bf6fa02f15e89a3c8114fda2df33b1b204f11be
parent8e28ddd8fab40e985756729f23e8f352d2dab071 (diff)
downloadfreeipa-3f90aa0c18727f02e5e373ea0b625cfa6edb7a37.tar.gz
freeipa-3f90aa0c18727f02e5e373ea0b625cfa6edb7a37.tar.xz
freeipa-3f90aa0c18727f02e5e373ea0b625cfa6edb7a37.zip
tests: Allow Tracker.dn be an instance of Fuzzy
Some of the IPA LDAP entries are using ipaUniqueID as the "primary key". To match this UUID based attribute in assert_deepequal, an instance of Fuzzy class must be used. This change adds the possibility to assign the Fuzzy object as the DN for the tracked entry. The user may need to override the rdn and name properties for the class using the Fuzzy DN. Reviewed-By: Lenka Doudova <ldoudova@redhat.com>
-rw-r--r--ipatests/test_xmlrpc/ldaptracker.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ipatests/test_xmlrpc/ldaptracker.py b/ipatests/test_xmlrpc/ldaptracker.py
index d9763e116..9cc44f8a6 100644
--- a/ipatests/test_xmlrpc/ldaptracker.py
+++ b/ipatests/test_xmlrpc/ldaptracker.py
@@ -11,6 +11,7 @@ import functools
from ipalib import api, errors
from ipapython.dn import DN
from ipapython.version import API_VERSION
+from ipatests.util import Fuzzy
class Tracker(object):
@@ -88,8 +89,8 @@ class Tracker(object):
@dn.setter
def dn(self, value):
- if not isinstance(value, DN):
- raise ValueError('The value must be an instance of DN.')
+ if not (isinstance(value, DN) or isinstance(value, Fuzzy)):
+ raise ValueError('The value must be an instance of DN or Fuzzy.')
self._dn = value
@property