Exemplo n.º 1
0
 def test_device_view_cfg_control_border_color(self):
     test_control = DeviceView("DVIEWID",
                               control_border_color=Color.TURQUOISE)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(Color(int(cfg_dict['ctrlBorderColor'])),
                      Color.TURQUOISE,
                      "CFG ctrlBorderColor should be TURQUOISE")
Exemplo n.º 2
0
 def test_device_view_cfg_control_title_box_color(self):
     test_control = DeviceView("DVIEWID",
                               control_title_box_color=Color.CHOCOLATE)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(Color(int(cfg_dict['ctrlTitleBoxColor'])),
                      Color.CHOCOLATE,
                      "CFG ctrlTitleBoxColor should be CHOCOLATE")
Exemplo n.º 3
0
 def test_device_view_cfg_control_background_transparency(self):
     test_control = DeviceView("DVIEWID",
                               control_background_transparency=50)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(cfg_dict['ctrlBkgndTransparency'], 50,
                      "CFG ctrlBkgndTransparency should be 50")
Exemplo n.º 4
0
 def test_device_view_cfg_control_max_font_size(self):
     test_control = DeviceView("DVIEWID", control_max_font_size=20)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(cfg_dict['ctrlMaxFontSize'], 20,
                      "CFG ctrlMaxFontSize should be 20")
Exemplo n.º 5
0
 def test_device_view_control_background_color(self):
     test_control = DeviceView("DVIEWID",
                               control_background_color=Color.BISQUE)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(Color(int(cfg_dict['ctrlBkgndColor'])), Color.BISQUE,
                      "CFG ctrlBkgndColor should be BISQUE")
Exemplo n.º 6
0
 def test_device_view_cfg_control_border_on(self):
     test_control = DeviceView("DVIEWID", control_border_on=True)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(cfg_dict['ctrlBorderOn'], True,
                      "CFG ctrlBorderColor should be True")
Exemplo n.º 7
0
 def test_device_view_cfg_control_color(self):
     test_control = DeviceView("DVIEWID", control_color=Color.TOMATO)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(Color(int(cfg_dict['ctrlColor'])), Color.TOMATO,
                      "CFG ctrlColor should be TOMATO")
Exemplo n.º 8
0
 def test_device_view_cfg_control_title_box_transparency(self):
     test_control = DeviceView("DVIEWID", control_title_box_transparency=2)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(cfg_dict['ctrlTitleBoxTransparency'], 2,
                      "CFG ctrlTitleBoxTransparency should be 2")
Exemplo n.º 9
0
 def test_device_view_cfg_num_column(self):
     test_control = DeviceView("DVIEWID", num_columns=3)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(cfg_dict['numColumns'], 3,
                      "CFG num_column should be 3")
Exemplo n.º 10
0
 def test_device_view_cfg_share_column(self):
     test_control = DeviceView("DVIEWID", share_column=False)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(cfg_dict['shareColumn'], False,
                      "CFG share_column should be False")
Exemplo n.º 11
0
 def test_device_view_cfg_color(self):
     test_control = DeviceView("DVIEWID", color=Color.BURLY_WOOD)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(Color(int(cfg_dict['color'])), Color.BURLY_WOOD,
                      "CFG color should be BURLY_WOOD")
Exemplo n.º 12
0
 def test_device_view_cfg_icon_name(self):
     test_control = DeviceView("DVIEWID", icon=Icon.RIGHT_DOUBLE)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(Icon(cfg_dict['iconName']), Icon.RIGHT_DOUBLE,
                      "CFG iconName should be RIGHT_DOUBLE")