tmux-amq/tests/test_ack.py

10 lines
301 B
Python
Raw Normal View History

from tamq.store import Store
def test_acknowledge_message(tmp_path):
store = Store(tmp_path / "queue.sqlite3")
message_id = store.add("a", "b", "body")
assert store.acknowledge(message_id)
assert store.list()[0]["state"] == "acknowledged"
assert not store.acknowledge("missing")