def test_remove_multiple(self): """fileops:Remove with multiple paths parses correctly""" expected = ['rm -f /a/path/to/file /and/this'] params = { 'hosts': ['testhost.example.com'], 'command': 'fileops', 'subcommand': 'Touch', 'path': ['/a/path/to/file', '/and/this'] } (update, cmd) = fileops._parse_Remove(params, self.app_logger) self.assertEqual(cmd, expected)
def test_remove(self): """fileops:Remove with params parses correctly""" expected = ['rm -f /tmp/file'] params = { 'hosts': ['testhost.example.com'], 'command': 'fileops', 'subcommand': 'Remove', 'path': '/tmp/file' } (update, cmd) = fileops._parse_Remove(params, self.app_logger) self.assertEqual(cmd, expected)