Ejemplo n.º 1
0
    def test_do_chassis_create_with_uuid(self):
        client_mock = mock.MagicMock()
        args = mock.MagicMock()
        args.uuid = uuidutils.generate_uuid()

        c_shell.do_chassis_create(client_mock, args)
        client_mock.chassis.create.assert_called_once_with(uuid=args.uuid)
    def test_do_chassis_create_with_uuid(self):
        client_mock = mock.MagicMock()
        args = mock.MagicMock()
        args.uuid = uuidutils.generate_uuid()

        c_shell.do_chassis_create(client_mock, args)
        client_mock.chassis.create.assert_called_once_with(uuid=args.uuid)
 def test_do_chassis_create_valid_field(self):
     client_mock = mock.MagicMock()
     args = mock.MagicMock()
     args.extra = ["key1=val1", "key2=val2"]
     args.description = 'desc'
     c_shell.do_chassis_create(client_mock, args)
     client_mock.chassis.create.assert_called_once_with(extra={
                                                        'key1': 'val1',
                                                        'key2': 'val2'},
                                                        description='desc')
Ejemplo n.º 4
0
 def test_do_chassis_create_valid_field(self):
     client_mock = mock.MagicMock()
     args = mock.MagicMock()
     args.extra = ["key1=val1", "key2=val2"]
     args.description = 'desc'
     c_shell.do_chassis_create(client_mock, args)
     client_mock.chassis.create.assert_called_once_with(extra={
         'key1': 'val1',
         'key2': 'val2'
     },
                                                        description='desc')
 def test_do_chassis_create(self):
     client_mock = mock.MagicMock()
     args = mock.MagicMock()
     c_shell.do_chassis_create(client_mock, args)
     client_mock.chassis.create.assert_called_once_with()
Ejemplo n.º 6
0
 def test_do_chassis_create(self):
     client_mock = mock.MagicMock()
     args = mock.MagicMock()
     args.json = False
     c_shell.do_chassis_create(client_mock, args)
     client_mock.chassis.create.assert_called_once_with()