From cdb8c4ae80a05852a50e0b383c9696799fb21293 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 8 Aug 2017 16:50:11 +1200 Subject: selftest: Move get_partial_attribute_set() to DrsBaseTestCase Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher Reviewed-by: Garming Sam --- source4/torture/drs/python/drs_base.py | 7 +++++++ source4/torture/drs/python/getnc_exop.py | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'source4/torture/drs') diff --git a/source4/torture/drs/python/drs_base.py b/source4/torture/drs/python/drs_base.py index 2803e181e6b..e79f076268c 100644 --- a/source4/torture/drs/python/drs_base.py +++ b/source4/torture/drs/python/drs_base.py @@ -452,6 +452,13 @@ class DrsBaseTestCase(SambaToolCmdTest): (drs_handle, supported_extensions) = drs_DsBind(drs) return (drs, drs_handle) + def get_partial_attribute_set(self, attids=[drsuapi.DRSUAPI_ATTID_objectClass]): + partial_attribute_set = drsuapi.DsPartialAttributeSet() + partial_attribute_set.attids = attids + partial_attribute_set.num_attids = len(attids) + return partial_attribute_set + + class AbstractLink: def __init__(self, attid, flags, identifier, targetGUID, diff --git a/source4/torture/drs/python/getnc_exop.py b/source4/torture/drs/python/getnc_exop.py index caa782658fd..2b4bdc4b714 100644 --- a/source4/torture/drs/python/getnc_exop.py +++ b/source4/torture/drs/python/getnc_exop.py @@ -559,12 +559,6 @@ class DrsReplicaPrefixMapTestCase(drs_base.DrsBaseTestCase): if enum == ldb.ERR_NO_SUCH_OBJECT: pass - def get_partial_attribute_set(self, attids=[drsuapi.DRSUAPI_ATTID_objectClass]): - partial_attribute_set = drsuapi.DsPartialAttributeSet() - partial_attribute_set.attids = attids - partial_attribute_set.num_attids = len(attids) - return partial_attribute_set - def test_missing_prefix_map_dsa(self): partial_attribute_set = self.get_partial_attribute_set() -- cgit v1.2.1