lotr-sut/tests/backend/services/test_auth_service.py
Fellowship Scholar f6a5823439 init commit
2026-03-29 20:07:56 +00:00

15 lines
444 B
Python

import pytest
from unittest.mock import patch, MagicMock
from sut.backend.services.auth_service import AuthService
def test_authenticate_success():
# Arrange
auth_service = AuthService()
username = "frodo"
password = "shire123"
with patch.object(auth_service, 'verify_password', return_value=True):
# Act
result = auth_service.authenticate(username, password)
# Assert
assert result is True