Skip to content

Commit

Permalink
fix some warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ciur committed Feb 20, 2024
1 parent 226ca9d commit 3ea9d17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/rest/test_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_list_nodes_returns_only_folders(requests_mock):
user = make(User)
requests_mock.get(
user_me_url,
text=user.json()
text=user.model_dump_json()
)

# URL to above-mentioned user's home folder
Expand All @@ -40,7 +40,7 @@ def test_list_nodes_returns_only_folders(requests_mock):
Paginator,
page_number=1,
items=folder_items
).json()
).model_dump_json()

requests_mock.get(nodes_url, text=text_payload)

Expand Down Expand Up @@ -68,7 +68,7 @@ def test_list_nodes_returns_one_ocred_document(requests_mock):

requests_mock.get(
user_me_url,
text=user.json()
text=user.model_dump_json()
)

# URL to above-mentioned user's home folder
Expand All @@ -91,7 +91,7 @@ def test_list_nodes_returns_one_ocred_document(requests_mock):
Paginator,
page_number=1,
items=[node]
).json()
).model_dump_json()

requests_mock.get(nodes_url, text=text_payload)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_fetch_user(requests_mock):
email='[email protected]',
home_folder_id=UUID('a82cbe8e-fa0e-4aec-8950-7fcbeaef186c')
)
requests_mock.get('http://test/api/users/me', text=user.json())
requests_mock.get('http://test/api/users/me', text=user.model_dump_json())
got_user = api_client.get('/api/users/me', response_model=User)

assert got_user.email == '[email protected]'
Expand Down

0 comments on commit 3ea9d17

Please sign in to comment.