File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -14,3 +14,8 @@ def __post_init__(self):
1414 parameter_name = 'UpperBound' ,
1515 reason = 'type must be either "inclusive" or "exclusive"'
1616 )
17+ if int (self .id ) < 0 :
18+ raise InvalidParameterError (
19+ parameter_name = 'UpperBound' ,
20+ reason = 'id must be non-negative'
21+ )
Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ async def test_throws_error_for_invalid_lower_bound(
338338 ):
339339 client = prepared_database .with_authorization .client
340340
341- with pytest .raises (InvalidParameterError ):
341+ with pytest .raises (ValueError ):
342342 async for _ in client .read_events (
343343 '/' ,
344344 ReadEventsOptions (
@@ -372,7 +372,7 @@ async def test_throws_error_for_invalid_upper_bound(
372372 ):
373373 client = prepared_database .with_authorization .client
374374
375- with pytest .raises (InvalidParameterError ):
375+ with pytest .raises (ValueError ):
376376 async for _ in client .read_events (
377377 '/' ,
378378 ReadEventsOptions (
You can’t perform that action at this time.
0 commit comments