Refine ranch tree, growth sync and monitoring policies

This commit is contained in:
AttilaNet
2026-11-08 09:53:02 +08:00
parent a37627b490
commit 9611a3413f
24 changed files with 640 additions and 1227 deletions
+2 -5
View File
@@ -172,7 +172,8 @@ class AccountGuiTests(unittest.TestCase):
hub.tabs.setCurrentWidget(first)
for page in (first.egg_page, first.monster_page, first.room_page):
first.tabs.setCurrentWidget(page)
self.assertEqual([first.slots.rowCount(), first.eggs.rowCount(), first.monsters.rowCount(), first.rooms_table.rowCount()], [11, 4, 4, 1])
self.assertEqual([first.slots.rowCount(), first.eggs.rowCount(), len(first.monsters.monster_items)], [11, 4, 4])
self.assertIn("room:1", first.monsters.group_items)
self.assertEqual(first.saved_sessions.count(), 1)
first.start_monitor.setChecked(True)
hub.tabs.setCurrentWidget(second)
@@ -204,10 +205,6 @@ class AccountGuiTests(unittest.TestCase):
self.assertTrue(all(url.endswith("masterService/masterQueryDetail") for _, url, _ in calls[before:]))
self.assertFalse(first.engine.auto)
self.assertIs(first.tabs.currentWidget(), first.egg_page)
first.farm.running = True
first.farm.adb.serial = "phone-a"
self.assertFalse(hub.allow_device(second, "phone-a"))
self.assertTrue(hub.allow_device(second, "phone-b"))
self.assertFalse(hub.allow_login(second, "account-a"))
self.assertFalse(hub.allow_connection(second, first.engine.client.session))
finally: