Merge "Fix argument to handle_permissions"
This commit is contained in:
commit
b986d4e8a4
@ -121,8 +121,9 @@ class ConfigFile(object):
|
||||
os.chown(dest, stat.st_uid, stat.st_gid)
|
||||
|
||||
def _set_properties_from_conf(self, path):
|
||||
handle_permissions({'owner': self.owner, 'path': path,
|
||||
'perm': self.perm})
|
||||
config = {'permissions':
|
||||
[{'owner': self.owner, 'path': path, 'perm': self.perm}]}
|
||||
handle_permissions(config)
|
||||
|
||||
def copy(self):
|
||||
|
||||
|
@ -143,9 +143,10 @@ class ConfigFileTest(base.BaseTestCase):
|
||||
|
||||
config_file = copy.deepcopy(FAKE_CONFIG_FILE)
|
||||
config_file._set_properties_from_conf(config_file.dest)
|
||||
mock_handle_permissions.assert_called_with({'owner': 'user1',
|
||||
'path': config_file.dest,
|
||||
'perm': '0644'})
|
||||
mock_handle_permissions.assert_called_with({'permissions':
|
||||
[{'owner': 'user1',
|
||||
'path': config_file.dest,
|
||||
'perm': '0644'}]})
|
||||
|
||||
@mock.patch('glob.glob', return_value=[])
|
||||
def test_copy_no_source_not_optional(self,
|
||||
|
Loading…
x
Reference in New Issue
Block a user