Add queue hold release and listing controls
Debian Trixie package bundle / packages (push) Failing after 11m54s

This commit is contained in:
Mario Fetka
2026-07-23 09:49:21 +02:00
parent 0c5aa29921
commit efc5173d93
8 changed files with 270 additions and 11 deletions
@@ -111,6 +111,38 @@ class QueueClientTests(unittest.TestCase):
self.assertEqual(client.stream.commands, ["QDELE 999-deadbee"])
def test_list_reads_declared_payload(self):
data = b"007-deadbee 42\r\n999-cafebad 81\r\n"
client = QueueClient.__new__(QueueClient)
client.stream = Stream(
[Response(2024, f"{len(data)} Queue list follows"),
Response(1000, "OK")],
data,
)
self.assertEqual(
client.List(),
[("007-deadbee", 42), ("999-cafebad", 81)],
)
self.assertEqual(client.stream.commands, ["QLIST"])
self.assertEqual(client.stream.lengths, [len(data)])
def test_move_uses_qmove(self):
client = QueueClient.__new__(QueueClient)
client.stream = Stream([Response(1000, "999-deadbee OK")], b"")
client.Move("007-deadbee", 999)
self.assertEqual(client.stream.commands, ["QMOVE 007-deadbee 999"])
def test_run_accepts_existing_queue_id(self):
client = QueueClient.__new__(QueueClient)
client.stream = Stream([Response(1000, "000-deadbee OK")], b"")
client.Run("000-deadbee")
self.assertEqual(client.stream.commands, ["QRUN 000-deadbee"])
def test_retrieve_info_reads_declared_payload(self):
client = QueueClient.__new__(QueueClient)
client.stream = Stream(