tools: switch the button tests over to json

This commit is contained in:
Peter Hutterer
2019-07-27 16:56:19 +10:00
parent 607e47953c
commit e64a121572

View File

@@ -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"