diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-09 19:08:49 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-09 19:08:49 +0100 |
| commit | 4632e6183d38bfd239f066d7e9698f3d118a3f77 (patch) | |
| tree | 8d458ea7395c6e52186f0bfb38344dbc84f68cbe /tests/test_obs.py | |
| parent | c906d90dcf0abdfb347bd67d6f33a2c45ae32e66 (diff) | |
| download | deck-it-4632e6183d38bfd239f066d7e9698f3d118a3f77.tar.gz deck-it-4632e6183d38bfd239f066d7e9698f3d118a3f77.zip | |
fix: use OBS's stored password and explain auth failures
Diffstat (limited to 'tests/test_obs.py')
| -rw-r--r-- | tests/test_obs.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_obs.py b/tests/test_obs.py index aeb0791..cd317ed 100644 --- a/tests/test_obs.py +++ b/tests/test_obs.py @@ -3,9 +3,12 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) +import json +import tempfile import threading import time import unittest +from pathlib import Path import deckit.modules.obs as obs @@ -49,6 +52,16 @@ class Actions(unittest.TestCase): self.m.actions["record"](bad) +class Password(unittest.TestCase): + def test_reads_the_password_obs_stores(self): + p = Path(tempfile.mkdtemp()) / "config.json" + p.write_text(json.dumps({"server_password": "sekret"})) + self.assertEqual(obs._obs_password(p), "sekret") + + def test_missing_config_is_empty(self): + self.assertEqual(obs._obs_password(Path("/nonexistent/x.json")), "") + + class Serialized(unittest.TestCase): def test_actions_do_not_overlap(self): active = 0 |
