mirror of
https://github.com/onyx-and-iris/obsws-cli.git
synced 2026-04-18 15:03:44 +00:00
add stream, studiomode tests
This commit is contained in:
27
tests/test_studiomode.py
Normal file
27
tests/test_studiomode.py
Normal 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
|
||||
Reference in New Issue
Block a user