Skip to content

Commit d018afd

Browse files
committed
fixes pydyantic_extension
1 parent ac83cc9 commit d018afd

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/pytest-simcore/src/pytest_simcore/helpers/pydantic_ext.py renamed to packages/pytest-simcore/src/pytest_simcore/helpers/pydantic_extension.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,18 @@ def _mask(value):
1414
return masked_value
1515

1616

17+
def _hash(value):
18+
"""Uses hash number to mask the password"""
19+
return f"hash:{hash(value)}"
20+
21+
1722
class Secret4TestsStr(SecretStr):
1823
"""Prints a hint of the secret
1924
TIP: Can be handy for testing
2025
"""
2126

22-
def __str__(self) -> str:
27+
def _display(self) -> str | bytes:
28+
# SEE overrides _SecretBase._display
2329
value = self.get_secret_value()
2430
return _mask(value) if value else ""
2531

tests/e2e-playwright/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
decode_socketio_42_message,
3838
web_socket_default_log_handler,
3939
)
40-
from pytest_simcore.helpers.pydantic_ext import Secret4TestsStr
40+
from pytest_simcore.helpers.pydantic_extension import Secret4TestsStr
4141

4242
_PROJECT_CLOSING_TIMEOUT: Final[int] = 10 * MINUTE
4343
_OPENING_NEW_EMPTY_PROJECT_MAX_WAIT_TIME: Final[int] = 30 * SECOND

0 commit comments

Comments
 (0)