From fe716cc6c541239a34d55c0ca5812379a821779a Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Tue, 21 Aug 2012 09:08:14 -0400 Subject: fixed builtin mocks for py3k --- testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py') 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__) -- cgit v1.2.3-1-g7c22