File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 7
7
import responses
8
8
from requests import HTTPError , Session
9
9
10
- from tests .conftest import DEFAULT_TOKEN
10
+ from tests .data . test_defaults import DEFAULT_TOKEN
11
11
from todoist_api_python .endpoints import BASE_URL , TASKS_ENDPOINT
12
12
from todoist_api_python .http_requests import delete , get , post
13
13
@@ -42,12 +42,15 @@ def test_get_raise_for_status() -> None:
42
42
responses .add (
43
43
responses .GET ,
44
44
DEFAULT_URL ,
45
+ json = "<error description>" ,
45
46
status = 500 ,
46
47
)
47
48
48
- with pytest .raises (HTTPError ):
49
+ with pytest .raises (HTTPError ) as error_info :
49
50
get (Session (), DEFAULT_URL , DEFAULT_TOKEN )
50
51
52
+ assert error_info .value .response .content == b'"<error description>"'
53
+
51
54
52
55
@responses .activate
53
56
def test_post_with_data (default_task_response : dict [str , Any ]) -> None :
You can’t perform that action at this time.
0 commit comments