From 06c3f839b8b195d336f368f9c046c54d1c96ccdb Mon Sep 17 00:00:00 2001 From: Simon Pichugin Date: Thu, 22 Oct 2015 16:02:43 +0200 Subject: [PATCH] Ticket 48303 - Fix lib389 broken tests - test_module_proxy Description: Add Red Hat copyright block. Refactore code to the pytest compatibility. --- tests/test_module_proxy.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/test_module_proxy.py b/tests/test_module_proxy.py index e21271e..54dc3c2 100644 --- a/tests/test_module_proxy.py +++ b/tests/test_module_proxy.py @@ -1,4 +1,12 @@ - +# --- BEGIN COPYRIGHT BLOCK --- +# Copyright (C) 2015 Red Hat, Inc. +# All rights reserved. +# +# License: GPL (version 3 or any later version). +# See LICENSE for details. +# --- END COPYRIGHT BLOCK --- +# +import pytest import os from lib389.ds_instance import DSModuleProxy @@ -43,3 +51,8 @@ def test_module_proxy_plugin_call_with_all(fake_ds_class, fake_ds_modules): DSModuleProxy.populate_with_proxies(ds_inst, ds_inst, os.path.basename(fake_ds_modules)) assert ds_inst.plugin.automember.with_all(0, 3, 2, 1) == (1, 7, 5, 3) +if __name__ == '__main__': + # Run isolated + # -s for DEBUG mo de + CURRENT_FILE = os.path.realpath(__file__) + pytest.main("-s -v %s" % CURRENT_FILE) -- 2.4.3