From 862a97383ec19a14ad2cec850b958eeb929fb4f8 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Aug 02 2016 15:36:18 +0000 Subject: Test lchmod is called any any order The test suite should not assume any particular order in which os.lchmod is invoked. --- diff --git a/tests/test_tasks.py b/tests/test_tasks.py index d51492a..92b1847 100644 --- a/tests/test_tasks.py +++ b/tests/test_tasks.py @@ -434,7 +434,7 @@ class TasksTestCase(TestCase): obj = TestTask(123, 'some_method', ['random_arg'], None, None, temp_path) self.assertEquals(obj.chownTree(temp_path, 2, 0), None) - mock_lchown.assert_has_calls([call(temp_path, 2, 0), call(dummy_file2, 2, 0), call(dummy_file, 2, 0)]) + mock_lchown.assert_has_calls([call(temp_path, 2, 0), call(dummy_file2, 2, 0), call(dummy_file, 2, 0)], any_order=True) def test_BaseTaskHandler_localPath_file_exists(self): """ Tests the localPath function to ensure that when a file exists, it returns that path without