mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-27 12:51:25 -07:00
PEP 8 W291 whitespace cleanup.
This commit is contained in:
parent
95789f3949
commit
d913f69ba1
166 changed files with 493 additions and 565 deletions
|
@ -32,7 +32,7 @@ safe_vars = {}
|
|||
for k,v in task_vars.items():
|
||||
if k not in ['vars', 'hostvars']:
|
||||
safe_vars[k] = copy.deepcopy(v)
|
||||
else:
|
||||
else:
|
||||
sdata = str(v)
|
||||
newv = eval(sdata)
|
||||
safe_vars[k] = newv
|
||||
|
@ -46,7 +46,7 @@ with open('task_vars.json', 'wb') as f:
|
|||
|
||||
|
||||
class TaskMock(object):
|
||||
args = {'src': u'/tmp/deleteme',
|
||||
args = {'src': u'/tmp/deleteme',
|
||||
'dest': '/tmp/deleteme',
|
||||
'rsync_path': 'rsync'}
|
||||
async = None
|
||||
|
@ -82,7 +82,7 @@ class ModuleLoaderMock(object):
|
|||
pass
|
||||
|
||||
class SharedLoaderMock(object):
|
||||
module_loader = ModuleLoaderMock()
|
||||
module_loader = ModuleLoaderMock()
|
||||
|
||||
class SynchronizeTester(object):
|
||||
|
||||
|
@ -139,19 +139,19 @@ class SynchronizeTester(object):
|
|||
self.task.args[k] = v
|
||||
|
||||
# load inital task vars
|
||||
invarspath = os.path.join(fixturepath,
|
||||
invarspath = os.path.join(fixturepath,
|
||||
test_meta.get('fixtures', {}).get('taskvars_in', 'taskvars_in.json'))
|
||||
with open(invarspath, 'rb') as f:
|
||||
fdata = f.read()
|
||||
fdata = fdata.decode("utf-8")
|
||||
fdata = fdata.decode("utf-8")
|
||||
in_task_vars = json.loads(fdata)
|
||||
|
||||
# load expected final task vars
|
||||
outvarspath = os.path.join(fixturepath,
|
||||
outvarspath = os.path.join(fixturepath,
|
||||
test_meta.get('fixtures', {}).get('taskvars_out', 'taskvars_out.json'))
|
||||
with open(outvarspath, 'rb') as f:
|
||||
fdata = f.read()
|
||||
fdata = fdata.decode("utf-8")
|
||||
fdata = fdata.decode("utf-8")
|
||||
out_task_vars = json.loads(fdata)
|
||||
|
||||
# fixup the connection
|
||||
|
@ -164,7 +164,7 @@ class SynchronizeTester(object):
|
|||
in_task_vars['hostvars'][k] = v
|
||||
|
||||
# initalize and run the module
|
||||
SAM = ActionModule(self.task, self.connection, self._play_context,
|
||||
SAM = ActionModule(self.task, self.connection, self._play_context,
|
||||
self.loader, self.templar, self.shared_loader_obj)
|
||||
SAM._execute_module = self._execute_module
|
||||
result = SAM.run(task_vars=in_task_vars)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue