예제 #1
0
def test_change_status_incorrect():
    order = Order(1)
    with pytest.raises(DevError) as e:
        order.change_status('in jail')
    assert 'status should be either "cooking" or "ready for pickup"' in str(e.value)
예제 #2
0
def test_change_status_correct():
    order=Order(1)
    order.change_status('cooking')
    assert order.status=='cooking'