|
10 | 10 | from dataclasses import dataclass |
11 | 11 | from datetime import datetime, timedelta, timezone |
12 | 12 | from tempfile import mkstemp |
13 | | -from typing import Callable, List, Optional, Union |
| 13 | +from typing import Callable, List, Optional, Union, Type |
14 | 14 | from urllib.parse import parse_qs, urlparse |
15 | 15 |
|
16 | 16 | import pytest |
@@ -475,7 +475,7 @@ def __init__( |
475 | 475 | body: Optional[str] = None, |
476 | 476 |
|
477 | 477 | # Custom exception to raise |
478 | | - exception: Optional[type[BaseException]] = None, |
| 478 | + exception: Optional[Type[BaseException]] = None, |
479 | 479 |
|
480 | 480 | # Whether exception should be raised before calling processor() |
481 | 481 | # (so changing server state) |
@@ -610,7 +610,7 @@ def __init__( |
610 | 610 | custom_response_on_create_abort_url=CustomResponse(enabled=False), |
611 | 611 | custom_response_on_abort=CustomResponse(enabled=False), |
612 | 612 | # exception which is expected to be thrown (so upload is expected to have failed) |
613 | | - expected_exception_type: Optional[type[BaseException]] = None, |
| 613 | + expected_exception_type: Optional[Type[BaseException]] = None, |
614 | 614 | # if abort is expected to be called |
615 | 615 | expected_aborted: bool = False): |
616 | 616 | self.name = name |
@@ -1341,7 +1341,7 @@ def __init__( |
1341 | 1341 | custom_response_on_abort=CustomResponse(enabled=False), |
1342 | 1342 |
|
1343 | 1343 | # exception which is expected to be thrown (so upload is expected to have failed) |
1344 | | - expected_exception_type: Optional[type[BaseException]] = None, |
| 1344 | + expected_exception_type: Optional[Type[BaseException]] = None, |
1345 | 1345 |
|
1346 | 1346 | # if abort is expected to be called |
1347 | 1347 | expected_aborted: bool = False): |
|
0 commit comments