MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / test_quoting

Method test_quoting

tests/test_vault_commands.py:259–268  ·  view source on GitHub ↗

Check if quoting is self-consistent among mkdir and cd.

(self)

Source from the content-addressed store, hash-verified

257 self.assertEqual(len(params.shared_folder_cache), len(exported['shared_folders']))
258
259 def test_quoting(self):
260 """Check if quoting is self-consistent among mkdir and cd."""
261 params = TestConnectedCommands.params
262 with mock.patch('builtins.input', side_effect=KeyboardInterrupt()), mock.patch('builtins.print'):
263 cli.do_command(params, 'mkdir --user-folder "/quoting"')
264 cli.do_command(params, 'cd /quoting')
265 for subdir in ('a//b', r'c\ d', r'e\"f', r"g\'h", r'\\'):
266 cli.do_command(params, 'mkdir --user-folder {}'.format(subdir))
267 cli.do_command(params, 'cd {}'.format(subdir))
268 cli.do_command(params, 'cd /quoting')
269
270 def test_vault_reports(self):
271 params = TestConnectedCommands.params

Callers

nothing calls this directly

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected