Ejemplo n.º 1
0
def test_get_context():
    ticket = Ticket(testutil.create_ticket(ops=["read"]))
    ctx = Context()
    ticket.add_context(1, ctx)
    assert ticket.get_context(1) is ctx
Ejemplo n.º 2
0
def test_get_context_missing():
    ticket = Ticket(testutil.create_ticket(ops=["read"]))
    with pytest.raises(KeyError):
        ticket.get_context(1)