Ejemplo n.º 1
0
 def test_default_values(self, setting_info2, value):
     bytes_ = buttons.process_value(setting_info2, value)
     assert bytes_ == [
         0x01, 0x00, 0x00,
         0x02, 0x00, 0x00,
         0x61, 0xB5, 0x00,
         0x30, 0x00, 0x00,
     ]
Ejemplo n.º 2
0
 def test_dict_values(self, setting_info2):
     bytes_ = buttons.process_value(setting_info2, {
         "buttons": {
             "button1": "button4",
             "button2": "PlayPause",
             "button3": "Enter",
             "button4": "dpi",
         }
     })
     assert bytes_ == [
         0x04, 0x00, 0x00,
         0x61, 0xCD, 0x00,
         0x51, 0x28, 0x00,
         0x30, 0x00, 0x00,
     ]
Ejemplo n.º 3
0
 def test_string_value_disable(self, setting_info1, value):
     bytes_ = buttons.process_value(setting_info1, value)  # noqa
     assert bytes_ == [
         0x00, 0x00, 0x00,
         0x02, 0x00, 0x00,
     ]
Ejemplo n.º 4
0
 def test_string_value_dpi(self, setting_info1):
     bytes_ = buttons.process_value(setting_info1, "buttons(button1=dpi)")
     assert bytes_ == [
         0x30, 0x00, 0x00,
         0x02, 0x00, 0x00,
     ]
Ejemplo n.º 5
0
 def test_string_values_scroll(self, setting_info1, value, expected):
     bytes_ = buttons.process_value(setting_info1, value)
     assert bytes_ == expected
Ejemplo n.º 6
0
 def test_string_values_multimedia(self, setting_info1, value, expected):  # noqa
     bytes_ = buttons.process_value(setting_info1, value)
     assert bytes_ == expected
Ejemplo n.º 7
0
 def test_string_values_keyboard_qwerty(self, setting_info1, value, expected):  # noqa
     bytes_ = buttons.process_value(setting_info1, value)
     assert bytes_ == expected