diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-15 09:06:43 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-15 09:06:43 -0400 |
commit | b862090945322d5ba4b42e180bba92afb860df21 (patch) | |
tree | 1c482adfa9561bad14d82fc442f8f319b33b1d4f /testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestPermissions.py | |
parent | 7890fd0aa5331541c71b893c313553765ca1628e (diff) | |
download | bcfg2-b862090945322d5ba4b42e180bba92afb860df21.tar.gz bcfg2-b862090945322d5ba4b42e180bba92afb860df21.tar.bz2 bcfg2-b862090945322d5ba4b42e180bba92afb860df21.zip |
POSIX:
refactored POSIX tool into multiple files to make it more manageable
Added unit tests for POSIX tool and sub-tools
fixed ACL handling for filesystems mounted noacl
Diffstat (limited to 'testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestPermissions.py')
-rw-r--r-- | testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestPermissions.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestPermissions.py b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestPermissions.py new file mode 100644 index 000000000..94b74dd13 --- /dev/null +++ b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestPermissions.py @@ -0,0 +1,21 @@ +import os +import unittest +import lxml.etree +from mock import Mock, MagicMock, patch +from Bcfg2.Client.Tools.POSIX.Permissions import * +from Test__init import 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) + +def get_permissions_object(posix=None): + if posix is None: + posix = get_posix_object() + return POSIXPermissions(posix.logger, posix.setup, posix.config) + +class TestPOSIXPermissions(unittest.TestCase): + # nothing to test! + pass |