Merge pull request #57 from onyx-and-iris/dev

Return response class for toggle_record
This commit is contained in:
Onyx and Iris 2025-05-14 20:19:49 +01:00 committed by GitHub
commit 8e8062d5c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 32 deletions

View File

@ -171,7 +171,9 @@ logging.basicConfig(level=logging.DEBUG)
Install [hatch][hatch-install] and then: Install [hatch][hatch-install] and then:
`hatch test` ```
hatch test
```
### Official Documentation ### Official Documentation

View File

@ -1784,7 +1784,7 @@ class ReqClient:
""" """
self.send("ToggleRecord") return self.send("ToggleRecord")
def start_record(self): def start_record(self):
""" """

View File

@ -1 +1 @@
version = "1.7.1" version = "1.7.2"

View File

@ -13,35 +13,8 @@ class TestRequests:
def test_get_hot_key_list(self): def test_get_hot_key_list(self):
resp = req_cl.get_hot_key_list() resp = req_cl.get_hot_key_list()
obsbasic_hotkey_list = [ assert resp.hotkeys
"OBSBasic.SelectScene", assert any(x.startswith("OBSBasic.") for x in resp.hotkeys)
"OBSBasic.QuickTransition.1",
"OBSBasic.QuickTransition.2",
"OBSBasic.QuickTransition.3",
"OBSBasic.StartStreaming",
"OBSBasic.StopStreaming",
"OBSBasic.ForceStopStreaming",
"OBSBasic.StartRecording",
"OBSBasic.StopRecording",
"OBSBasic.PauseRecording",
"OBSBasic.UnpauseRecording",
"OBSBasic.SplitFile",
"OBSBasic.StartReplayBuffer",
"OBSBasic.StopReplayBuffer",
"OBSBasic.StartVirtualCam",
"OBSBasic.StopVirtualCam",
"OBSBasic.EnablePreview",
"OBSBasic.DisablePreview",
"OBSBasic.EnablePreviewProgram",
"OBSBasic.DisablePreviewProgram",
"OBSBasic.ShowContextBar",
"OBSBasic.HideContextBar",
"OBSBasic.Transition",
"OBSBasic.ResetStats",
"OBSBasic.Screenshot",
"OBSBasic.SelectedSourceScreenshot",
]
assert all(x in resp.hotkeys for x in obsbasic_hotkey_list)
@pytest.mark.parametrize( @pytest.mark.parametrize(
"name,data", "name,data",