summaryrefslogtreecommitdiffstats
path: root/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-21 09:08:14 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-21 13:33:20 -0400
commitfe716cc6c541239a34d55c0ca5812379a821779a (patch)
treebc183cb1af816cb5fe184a21f99e38f15c200d6f /testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py
parentd0efac8fde1f2bfc77b45899073c225201c64a2c (diff)
downloadbcfg2-fe716cc6c541239a34d55c0ca5812379a821779a.tar.gz
bcfg2-fe716cc6c541239a34d55c0ca5812379a821779a.tar.bz2
bcfg2-fe716cc6c541239a34d55c0ca5812379a821779a.zip
fixed builtin mocks for py3k
Diffstat (limited to 'testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py')
-rw-r--r--testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py
index 34784dc3d..06912c19c 100644
--- a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py
+++ b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py
@@ -74,7 +74,7 @@ class TestPOSIXFile(TestPOSIXTool):
entry.text = ustr
self.assertEqual(ptool._get_data(entry), (ustr, False))
- @patch("__builtin__.open")
+ @patch("%s.open" % builtins)
@patch("Bcfg2.Client.Tools.POSIX.base.POSIXTool.verify")
@patch("Bcfg2.Client.Tools.POSIX.File.%s._exists" % test_obj.__name__)
@patch("Bcfg2.Client.Tools.POSIX.File.%s._get_data" % test_obj.__name__)
@@ -207,7 +207,7 @@ class TestPOSIXFile(TestPOSIXTool):
mock_rename.assert_called_with(newfile, entry.get("name"))
mock_unlink.assert_called_with(newfile)
- @patch("__builtin__.open")
+ @patch("%.open" % builtins)
@patch("Bcfg2.Client.Tools.POSIX.File.%s._diff" % test_obj.__name__)
@patch("Bcfg2.Client.Tools.POSIX.File.%s._get_data" % test_obj.__name__)
@patch("Bcfg2.Client.Tools.POSIX.File.%s._is_string" % test_obj.__name__)