mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
tools: switch the button tests over to json
This commit is contained in:
@@ -526,10 +526,38 @@ class TestRatbagCtlReportRate(TestRatbagCtl):
|
||||
|
||||
|
||||
class TestRatbagCtlButton(TestRatbagCtl):
|
||||
json = '''
|
||||
{
|
||||
"profiles": [
|
||||
{ "is_active": true,
|
||||
"buttons": [
|
||||
{ "button": 0 },
|
||||
{ "action_type": "none" },
|
||||
{ "action_type": "special",
|
||||
"special": "profile-cycle-up" },
|
||||
{ "action_type": "macro",
|
||||
"macro": [ "+B", "-B", "t300" ] }
|
||||
]
|
||||
},
|
||||
{ "is_active": false
|
||||
},
|
||||
{ "is_active": false,
|
||||
"buttons": [
|
||||
{ "action_type": "special",
|
||||
"special": "profile-cycle-up" },
|
||||
{ "action_type": "special" },
|
||||
{ "button": 2,
|
||||
"action_type": "button" },
|
||||
{ "button": 3,
|
||||
"action_type": "button" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
'''
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.setProfile(0)
|
||||
|
||||
def test_button_count(self):
|
||||
command = "button count"
|
||||
|
||||
Reference in New Issue
Block a user