Integrate YuE2 as an exclusive Athena mode
This commit is contained in:
@@ -80,6 +80,13 @@ class DashboardModeTests(unittest.TestCase):
|
||||
self.assertEqual(body, {"status": "accepted"})
|
||||
self.assertEqual(json.loads(urlopen.call_args.args[0].data), {"mode": "applio"})
|
||||
|
||||
def test_yue2_mode_is_forwarded_to_router(self):
|
||||
with patch.object(self.dashboard.urllib.request, "urlopen", return_value=_Response()) as urlopen:
|
||||
status, body = self.dashboard.change_mode("yue2")
|
||||
self.assertEqual(status, 202)
|
||||
self.assertEqual(body, {"status": "accepted"})
|
||||
self.assertEqual(json.loads(urlopen.call_args.args[0].data), {"mode": "yue2"})
|
||||
|
||||
def test_unknown_mode_is_rejected_without_router_request(self):
|
||||
with patch.object(self.dashboard.urllib.request, "urlopen") as urlopen:
|
||||
status, body = self.dashboard.change_mode("unknown")
|
||||
@@ -104,6 +111,15 @@ class DashboardModeTests(unittest.TestCase):
|
||||
self.assertIn("http://192.168.1.212:8011/", html)
|
||||
self.assertIn("http://192.168.1.212:8012/", html)
|
||||
|
||||
def test_dashboard_keeps_ace_step_and_offers_yue2_separately(self):
|
||||
html = self.dashboard.HTML
|
||||
|
||||
self.assertIn("ACE-Step Studio", html)
|
||||
self.assertIn("YuE2 Studio", html)
|
||||
self.assertIn("setMode('music')", html)
|
||||
self.assertIn("setMode('yue2')", html)
|
||||
self.assertIn("http://192.168.1.212:8014/", html)
|
||||
|
||||
def test_dashboard_lists_only_portable_encrypted_backups(self):
|
||||
valid = self.backup_dir / "athena-portable-2026-09-10T10-00-00Z.tar.zst.age"
|
||||
valid.write_bytes(b"encrypted")
|
||||
|
||||
Reference in New Issue
Block a user