Fix button callback event registration, release notes handler, and menu navigation
This commit is contained in:
@@ -18,6 +18,7 @@ async def _cleanup(repo):
|
||||
await conn.execute("DELETE FROM posts WHERE source_channel_id = $1;", SRC)
|
||||
await conn.execute("DELETE FROM sources WHERE channel_id = $1;", SRC)
|
||||
await conn.execute("DELETE FROM targets WHERE channel_id = $1;", TRG)
|
||||
await conn.execute("DELETE FROM channel_categories;")
|
||||
|
||||
|
||||
def button_data(rows):
|
||||
|
||||
@@ -17,7 +17,7 @@ class FakeQueue:
|
||||
async def get_target_queue_size(self, target_id):
|
||||
return len(self.items)
|
||||
|
||||
async def pop_target_post(self, target_id):
|
||||
async def pop_target_post(self, target_id, dispatch_order="order"):
|
||||
return self.items.pop(0) if self.items else None
|
||||
|
||||
async def push_target_post(self, target_id, payload):
|
||||
|
||||
@@ -90,7 +90,7 @@ async def run_tests():
|
||||
assert progress[-1].startswith("ℹ️"), f"repeat scrape must be explained: {progress[-1]}"
|
||||
assert "قبلا ذخیره شده" in progress[-1]
|
||||
|
||||
stored = await repo.get_posts_by_status("pending_review", limit=100)
|
||||
stored = await repo.get_posts_by_status("pending_review", limit=5000)
|
||||
mine = [p for p in stored if p.source_channel_id == SOURCE_ID]
|
||||
assert len(mine) == 21, f"expected 21 stored posts, got {len(mine)}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user