The PC join line says to run it as administrator before anything else runs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 13:58:24 -04:00
co-authored by Claude Opus 5.5
parent cc9d752287
commit a54b6b6276
2 changed files with 14 additions and 0 deletions
+9
View File
@@ -550,3 +550,12 @@ class TestSwitchKeys(unittest.TestCase):
lights = [t for t in kept_cfg["tiles"] if t["id"] == "lights"]
self.assertEqual((len(lights), lights[0]["pos"], "LIGHTS" in kept), (1, [2, 7], True))
self.assertEqual(len([t for t in kept_cfg["tiles"] if t.get("kind") == "autofix"]), 1)
class TestJoinWindowsAdmin(unittest.TestCase):
def test_the_pc_line_stops_with_plain_words_when_not_administrator(self):
cfg = json.load(open(os.path.join(ROOT, "sites", "sc", "config.json")))
text = campus.join_windows(cfg, "http://10.5.2.60:8020")
check = text.index("IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)")
self.assertLess(check, text.index("Get-WindowsCapability")) # before anything needs it
self.assertIn("Run as administrator", text)