From ad0798f9e7fe105fa1314daf0213d8d3d50bd2e1 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Thu, 16 Aug 2012 09:35:31 -0400 Subject: use common test libs for POSIX tests --- .../Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py') diff --git a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py index 38f3b6ee3..9ac23921c 100644 --- a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py +++ b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py @@ -5,19 +5,14 @@ import lxml.etree from mock import Mock, MagicMock, patch from Bcfg2.Client.Tools.POSIX.Nonexistent import * from Test__init import get_config, get_posix_object - -def call(*args, **kwargs): - """ the Mock call object is a fairly recent addition, but it's - very very useful, so we create our own function to create Mock - calls """ - return (args, kwargs) +from .....common import * def get_nonexistent_object(posix=None): if posix is None: posix = get_posix_object() return POSIXNonexistent(posix.logger, posix.setup, posix.config) -class TestPOSIXNonexistent(unittest.TestCase): +class TestPOSIXNonexistent(Bcfg2TestCase): @patch("os.path.lexists") def test_verify(self, mock_lexists): entry = lxml.etree.Element("Path", name="/test", type="nonexistent") -- cgit v1.2.3-1-g7c22