Skip to content

Commit 1dc2b80

Browse files
author
Saimon Michelson
committed
update to pass tox
1 parent 3911bd9 commit 1dc2b80

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/ut/core/user/test_special_characters.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def setUp(self):
3535
self._special_dir = 'My Files/100% Complete'
3636
self._special_filename = 'file_100%_done.txt'
3737
self._special_path = f'{self._special_dir}/{self._special_filename}'
38+
self._mock_properties_response = self.patch_call('cterasdk.cio.core.commands.GetProperties._handle_response')
3839

3940
def _expected_encoded_absolute(self, path):
4041
return f'{self._base}/{quote(path)}'
@@ -44,6 +45,7 @@ def _expected_encoded_absolute(self, path):
4445
def test_handle_encodes_special_characters(self):
4546
for filename in self.SPECIAL_FILENAMES:
4647
path = f'My Files/{filename}'
48+
self._mock_properties_response.return_value = munch.Munch({'is_dir': False, 'path': path})
4749
self._init_services()
4850
mock_download = mock.MagicMock()
4951
self._services.io._webdav.download = mock_download # pylint: disable=protected-access
@@ -57,6 +59,7 @@ def test_handle_encodes_special_characters(self):
5759
def test_handle_percent_in_directory(self):
5860
for directory in self.SPECIAL_DIRECTORIES:
5961
path = f'{directory}/document.txt'
62+
self._mock_properties_response.return_value = munch.Munch({'is_dir': False, 'path': path})
6063
self._init_services()
6164
mock_download = mock.MagicMock()
6265
self._services.io._webdav.download = mock_download # pylint: disable=protected-access

0 commit comments

Comments
 (0)