Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_none_arguments():
"""Check string 'None' conversion to None."""
raw_arguments = {
'admin_groups': 'None',
'admin_users': 'None',
'computer_name': 'None',
'salt_states': 'None',
'ou_path': 'None'
}
watchmaker_arguments = watchmaker.Arguments(**dict(**raw_arguments))
assert not watchmaker_arguments.admin_groups
assert not watchmaker_arguments.admin_users
assert not watchmaker_arguments.computer_name
assert not watchmaker_arguments.salt_states
assert not watchmaker_arguments.ou_path
def main(extra_arguments=None, **kwargs):
"""Entry point for Watchmaker cli."""
prepare_logging(kwargs['log_dir'], kwargs['log_level'])
sys.excepthook = exception_hook
watchmaker_arguments = watchmaker.Arguments(**dict(
extra_arguments=extra_arguments,
**kwargs
))
watchmaker_client = watchmaker.Client(watchmaker_arguments)
sys.exit(watchmaker_client.install())