Skip to content

Commit

Permalink
✅ Mock only sys.stdout.isatty, not sys.stdout
Browse files Browse the repository at this point in the history
Signed-off-by: ff137 <ff137@proton.me>
  • Loading branch information
ff137 committed Feb 21, 2025
1 parent 1cedc87 commit e285e71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions acapy_agent/config/tests/test_ledger.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from unittest import IsolatedAsyncioTestCase

import pytest
Expand Down Expand Up @@ -634,9 +635,8 @@ async def test_ledger_accept_taa_not_tty_not_accept_config(self, mock_stdout):
None, self.profile, taa_info, provision=False
)

@mock.patch("sys.stdout")
async def test_ledger_accept_taa_tty(self, mock_stdout):
mock_stdout.isatty = mock.MagicMock(return_value=True)
async def test_ledger_accept_taa_tty(self):
sys.stdout.isatty = mock.MagicMock(return_value=True)
self.profile = await create_test_profile()

taa_info = {
Expand Down

0 comments on commit e285e71

Please sign in to comment.