Ejemplo n.º 1
0
 def test_remove_files_not_exists(self, mock_path):
     mock_path.exists.return_value = False
     files = ['file1', 'file2', 'dir3']
     mock_path.join.side_effect = files
     bu.remove_files('chroot', files)
     self.assertEqual([mock.call('chroot', f) for f in files],
                      mock_path.join.call_args_list)
Ejemplo n.º 2
0
 def test_remove_files_not_exists(self, mock_path):
     mock_path.exists.return_value = False
     files = ['file1', 'file2', 'dir3']
     mock_path.join.side_effect = files
     bu.remove_files('chroot', files)
     self.assertEqual([mock.call('chroot', f) for f in files],
                      mock_path.join.call_args_list)