File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 4
4
import json
5
5
import unittest
6
6
from http import HTTPStatus
7
- from typing import Any , Optional
7
+ from typing import Any , Optional , Union
8
8
from unittest .mock import MagicMock , Mock , patch
9
9
10
10
import requests as requests_lib
36
36
37
37
38
38
def new_mock_empty_response (
39
- status : Optional [int | HTTPStatus ] = None ,
39
+ status : Optional [Union [ int , HTTPStatus ] ] = None ,
40
40
) -> requests_lib .Response :
41
41
# pylint: disable=protected-access
42
42
response = requests_lib .Response ()
@@ -50,7 +50,7 @@ def new_mock_empty_response(
50
50
51
51
def new_mock_json_response (
52
52
content : Optional [Any ] = None ,
53
- status : Optional [int | HTTPStatus ] = None ,
53
+ status : Optional [Union [ int , HTTPStatus ] ] = None ,
54
54
) -> requests_lib .Response :
55
55
# pylint: disable=protected-access
56
56
response = requests_lib .Response ()
Original file line number Diff line number Diff line change 4
4
5
5
import unittest
6
6
from http import HTTPStatus
7
- from typing import Optional
7
+ from typing import Optional , Union
8
8
from unittest .mock import Mock , patch
9
9
10
10
from gvm .errors import InvalidArgumentType
14
14
15
15
16
16
def new_mock_empty_response (
17
- status : Optional [int | HTTPStatus ] = None ,
17
+ status : Optional [Union [ int , HTTPStatus ] ] = None ,
18
18
headers : Optional [dict [str , str ]] = None ,
19
19
):
20
20
if status is None :
You can’t perform that action at this time.
0 commit comments