-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] storage_backend: Add move_files for filesystem
- Loading branch information
1 parent
3c3d948
commit be8c16e
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# Copyright 2017 Akretion (http://www.akretion.com). | ||
# @author Sébastien BEAU <[email protected]> | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
import os | ||
|
||
from odoo.exceptions import AccessError | ||
|
||
|
@@ -29,6 +30,15 @@ def test_find_files(self): | |
backend, ADAPTER_PATH, mocked_filepaths, r".*\.good$", expected | ||
) | ||
|
||
def test_move_files(self): | ||
backend = self.backend.sudo() | ||
base_dir = backend._get_adapter()._basedir() | ||
expected = [base_dir + "/" + self.filename] | ||
destination_path = os.path.join(base_dir, "destination") | ||
self._test_move_files( | ||
backend, ADAPTER_PATH, self.filename, destination_path, expected | ||
) | ||
|
||
|
||
class FileSystemDemoUserAccessCase(CommonCase): | ||
@classmethod | ||
|