Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(859)

Unified Diff: lib/naclports/tests/test_binary_package.py

Issue 1279413002: Remove execute bit from binaries install in the toolchain (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/naclports/source_package.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/naclports/tests/test_binary_package.py
diff --git a/lib/naclports/tests/test_binary_package.py b/lib/naclports/tests/test_binary_package.py
index 132fe3384ac028b115e23d61b8594079e0749ad2..ea9f79ad9addd4db7ed1c0ce543f078e855cd601 100644
--- a/lib/naclports/tests/test_binary_package.py
+++ b/lib/naclports/tests/test_binary_package.py
@@ -16,9 +16,11 @@ class TestBinaryPackage(common.NaclportsTest):
@patch('os.makedirs')
@patch('os.path.isdir', Mock(return_value=False))
def testInstallFile(self, makedirs_mock, rename_mock):
- binary_package.InstallFile('fname', 'location1', 'location2')
- makedirs_mock.assert_called_once_with('location2')
- rename_mock.assert_has_calls([call('location1/fname', 'location2/fname')])
+ mock_file = common.MockFileObject()
+ with patch('__builtin__.open', Mock(return_value=mock_file)):
+ binary_package.InstallFile('fname', 'location1', 'location2')
+ makedirs_mock.assert_called_once_with('location2')
+ rename_mock.assert_has_calls([call('location1/fname', 'location2/fname')])
def testRelocateFile(self):
# Only certain files should be relocated. A file called 'testfile'
« no previous file with comments | « lib/naclports/source_package.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698