Skip to content

Commit

Permalink
update test_local_auth method
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando Aureliano da Silva Maia committed Oct 20, 2023
1 parent db82a90 commit 9063fc6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/unit/test_okta.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,12 +561,10 @@ def test_local_auth(mocker):
from tokendito.http_client import HTTP_client

# Create a fake HTTP response using Mock
mock_response = Mock()
mock_response.raise_for_status = Mock()
mock_response.json = Mock(return_value={"status": "SUCCESS", "sessionToken": "pytesttoken"})
mock_response_data = {"status": "SUCCESS", "sessionToken": "pytesttoken"}

# Patch HTTP_client.post to return the mock response
mocker.patch.object(HTTP_client, "post", return_value=mock_response)
mocker.patch.object(HTTP_client, "post", return_value=mock_response_data)

# Initialize the configuration
pytest_config = Config(
Expand Down

0 comments on commit 9063fc6

Please sign in to comment.