add stream, studiomode tests

This commit is contained in:
2025-04-26 15:53:29 +01:00
parent 5ca61d04c7
commit 7915547fca
6 changed files with 97 additions and 11 deletions

27
tests/test_studiomode.py Normal file
View File

@@ -0,0 +1,27 @@
"""Unit tests for the studio mode command in the OBS WebSocket CLI."""
from typer.testing import CliRunner
from obsws_cli.app import app
runner = CliRunner()
def test_studio_enable():
"""Test the studio enable command."""
result = runner.invoke(app, ['studiomode', 'enable'])
assert result.exit_code == 0
result = runner.invoke(app, ['studiomode', 'status'])
assert result.exit_code == 0
assert 'Studio mode is enabled.' in result.stdout
def test_studio_disable():
"""Test the studio disable command."""
result = runner.invoke(app, ['studiomode', 'disable'])
assert result.exit_code == 0
result = runner.invoke(app, ['studiomode', 'status'])
assert result.exit_code == 0
assert 'Studio mode is disabled.' in result.stdout