Beispiel #1
0
def test_peek_buried(c: Client) -> None:
    id = c.put(b"buried")
    job = c.reserve()
    c.bury(job)
    job = c.peek_buried()
    assert job.id == id
    assert job.body == b"buried"
Beispiel #2
0
def test_peek_buried_not_found(c: Client) -> None:
    c.put(b"a ready job")
    with pytest.raises(NotFoundError):
        c.peek_buried()