コード例 #1
0
def test_search_order_incorrect_input():
    sys = System()
    order0 = sys.newOrder()
    order1 = sys.newOrder()
    order2 = sys.newOrder()

    with pytest.raises(UserError) as err:
        sys.searchOrder(32)
    assert 'OrderID not exist in the system' in str(err.value)
コード例 #2
0
def test_search_order_correct_input():
    sys = System()
    order0 = sys.newOrder()
    order1 = sys.newOrder()
    order2 = sys.newOrder()
    assert sys.searchOrder(1) == order1