File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 77import responses
88from requests import HTTPError , Session
99
10- from tests .conftest import DEFAULT_TOKEN
10+ from tests .data . test_defaults import DEFAULT_TOKEN
1111from todoist_api_python .endpoints import BASE_URL , TASKS_ENDPOINT
1212from todoist_api_python .http_requests import delete , get , post
1313
@@ -42,12 +42,15 @@ def test_get_raise_for_status() -> None:
4242 responses .add (
4343 responses .GET ,
4444 DEFAULT_URL ,
45+ json = "<error description>" ,
4546 status = 500 ,
4647 )
4748
48- with pytest .raises (HTTPError ):
49+ with pytest .raises (HTTPError ) as error_info :
4950 get (Session (), DEFAULT_URL , DEFAULT_TOKEN )
5051
52+ assert error_info .value .response .content == b'"<error description>"'
53+
5154
5255@responses .activate
5356def test_post_with_data (default_task_response : dict [str , Any ]) -> None :
You can’t perform that action at this time.
0 commit comments