docs: AG Native bundle reverse engineering analysis — plannerResponse/Whi renderer structure, V8 cache fix, known-issues update
This commit is contained in:
27
test_hub.py
Normal file
27
test_hub.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import asyncio
|
||||
from bot import GravityBot
|
||||
import discord
|
||||
|
||||
class FakeChannel:
|
||||
async def send(self, embed, view=None):
|
||||
print("Sent to channel successfully!")
|
||||
class FakeMsg:
|
||||
id = 999
|
||||
return FakeMsg()
|
||||
|
||||
async def test():
|
||||
bot = GravityBot(asyncio.Queue())
|
||||
bot.project_channels["gravity_control"] = FakeChannel()
|
||||
class FakeHub:
|
||||
def get_active_count(self, proj): return 1
|
||||
bot.hub = FakeHub()
|
||||
await bot._hub_on_pending("gravity_control", {
|
||||
"request_id": "test1",
|
||||
"command": "Running1 command",
|
||||
"description": "test",
|
||||
"step_type": "",
|
||||
"buttons": [{"text": "Proceed", "index": 0}],
|
||||
"timestamp": 12345678.0
|
||||
})
|
||||
|
||||
asyncio.run(test())
|
||||
Reference in New Issue
Block a user