Fixes typo in the fuel-menu urwid wrapper

The fuel-menu has a typo in CheckBox object mapping
from the original urwid.

Change-Id: Ida129483678ff1a559d8e0a4edf6f2e866657871
Closes-Bug: #1513180
This commit is contained in:
Aliaksandr Buhayeu 2015-11-04 22:05:52 +03:00
parent ed146b5c59
commit 2a37121ae5
2 changed files with 25 additions and 1 deletions

View File

@ -60,7 +60,7 @@ def ChoicesGroup(choices, default_value=None, fn=None):
def CheckBox(label, state=False, callback=None):
"""Returns an Urwid CheckBox object."""
return urwid.Checkbox(label,
return urwid.CheckBox(label,
state=state,
on_state_change=callback)

View File

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from fuelmenu.common import urwidwrapper
import unittest
class TestUtils(unittest.TestCase):
def test_urwidwrapper_correctly_maps_checkbox_object(self):
urwidwrapper.CheckBox('Label')