Пример #1
0
 def test__add_cmd_arguments(self):
     cmd = backupcmd_.BackupCmd()
     parser = mock.Mock(spec=[])
     parser.add_argument = mock.Mock()
     self.assertIsNone(cmd.add_cmd_arguments(parser))
     parser.add_argument.assert_has_calls([
         mock.call("devices",
                   metavar='DEV',
                   nargs="*",
                   help="block device to be included in backup")
     ])
Пример #2
0
 def test__run(self):
     cmd = backupcmd_.BackupCmd()
     self.assertEqual(cmd.run(), 0)
Пример #3
0
 def test__name(self):
     cmd = backupcmd_.BackupCmd()
     self.assertEqual(cmd.name, 'backup')
Пример #4
0
 def test__properties(self):
     cmd = backupcmd_.BackupCmd()
     self.assertEqual(cmd.properties, {'description': 'backup disk layout'})
Пример #5
0
 def test__isinstance_cmd(self):
     cmd = backupcmd_.BackupCmd()
     self.assertIsInstance(cmd, cmd_.Cmd)