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)
def test_search_order_correct_input(): sys = System() order0 = sys.newOrder() order1 = sys.newOrder() order2 = sys.newOrder() assert sys.searchOrder(1) == order1