Esempio n. 1
0
 def test_add_command(self):
     command_block = FileSystemServiceCommandBlock()
     command_block.add_command(DeleteCommand(path='/a/path'))
     et = command_block.get_etree()
     self.assertEqual(et.tag, 'commands')
     self.assertEqual(1, len(list(et)))
     self.assertEqual(0, len(et.keys()))
     self.assertIsNotNone(et.find('./{}'.format(DeleteCommand.command_name)))
Esempio n. 2
0
 def test_init(self):
     command_block = FileSystemServiceCommandBlock()
     et = command_block.get_etree()
     self.assertEqual(et.tag, 'commands')
     self.assertEqual(0, len(list(et)))
     self.assertEqual(0, len(et.keys()))