mirror of
https://github.com/onyx-and-iris/obsws-cli.git
synced 2026-04-18 06:53:38 +00:00
update toggle commands
add toggle record/toggle stream tests pre-release patch bump
This commit is contained in:
@@ -30,3 +30,18 @@ def test_record_start_status_stop():
|
||||
result = runner.invoke(app, ['record', 'status'])
|
||||
assert result.exit_code == 0
|
||||
assert 'Recording is not in progress.' in result.stdout
|
||||
|
||||
|
||||
def test_record_toggle():
|
||||
"""Test the record toggle command."""
|
||||
result = runner.invoke(app, ['record', 'status'])
|
||||
assert result.exit_code == 0
|
||||
active = 'Recording is in progress.' in result.stdout
|
||||
|
||||
result = runner.invoke(app, ['record', 'toggle'])
|
||||
assert result.exit_code == 0
|
||||
time.sleep(0.5) # Wait for the recording to toggle
|
||||
if active:
|
||||
assert 'Recording stopped successfully.' in result.stdout
|
||||
else:
|
||||
assert 'Recording started successfully.' in result.stdout
|
||||
|
||||
Reference in New Issue
Block a user