From c05180caa78eac0beb26c6791afd8642a97853e6 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Wed, 29 Sep 2010 16:00:04 +0300 Subject: s4-test-delete_object.py: Use common implementation for env_get_var_value() --- source4/torture/drs/python/delete_object.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'source4') diff --git a/source4/torture/drs/python/delete_object.py b/source4/torture/drs/python/delete_object.py index fb944456bc..0cf648f5a0 100644 --- a/source4/torture/drs/python/delete_object.py +++ b/source4/torture/drs/python/delete_object.py @@ -53,10 +53,10 @@ class DrsDeleteObjectTestCase(samba.tests.TestCase): # connect to DCs singleton if self.ldb_dc1 is None: - DrsDeleteObjectTestCase.dc1 = get_env_var("DC1") + DrsDeleteObjectTestCase.dc1 = samba.tests.env_get_var_value("DC1") DrsDeleteObjectTestCase.ldb_dc1 = samba.tests.connect_samdb(self.dc1, ldap_only=True) if self.ldb_dc2 is None: - DrsDeleteObjectTestCase.dc2 = get_env_var("DC2") + DrsDeleteObjectTestCase.dc2 = samba.tests.env_get_var_value("DC2") DrsDeleteObjectTestCase.ldb_dc2 = samba.tests.connect_samdb(self.dc2, ldap_only=True) # fetch rootDSEs @@ -209,9 +209,3 @@ class DrsDeleteObjectTestCase(samba.tests.TestCase): # check user info on DC2 - should be deleted self._check_user(sam_ldb=self.ldb_dc2, user_orig=user_orig, is_deleted=True) - -######################################################################################## -def get_env_var(var_name): - if not var_name in os.environ.keys(): - raise AssertionError("Please supply %s in environment" % var_name) - return os.environ[var_name] -- cgit