Compare commits

..

No commits in common. "895342a8ba976caa41f4b5b9fdec1c684e47dc5d" and "e9e34741ddad1c5f5099da50565259fc4375c12a" have entirely different histories.

4 changed files with 7 additions and 17 deletions

View File

@ -3,15 +3,15 @@
FastAPI Backend Platform for Acupedia Learning Content, Subscriptions, Pricing, and Payments.
<!-- START_TEST_STATUS -->
[![Tests](https://img.shields.io/badge/tests-6%20failed-red)](#test-status--coverage) [![Coverage](https://img.shields.io/badge/coverage-73%25-yellow)](#test-status--coverage)
[![Tests](https://img.shields.io/badge/tests-93%20passed-brightgreen)](#test-status--coverage) [![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](#test-status--coverage)
| Metric | Status |
| :--- | :--- |
| **Test Suite** | `FAILED` |
| **Tests Passing** | `92` |
| **Tests Failing** | `6` |
| **Core Coverage** | `73%` |
| **Last Updated** | `2026-10-22 06:02:56 UTC` |
| **Test Suite** | `PASSED` |
| **Tests Passing** | `93` |
| **Tests Failing** | `0` |
| **Core Coverage** | `100%` |
| **Last Updated** | `2026-10-19 06:13:19 UTC` |
<!-- END_TEST_STATUS -->
---

View File

@ -7,7 +7,6 @@ import json
import os
import re
import secrets
import string
import time
from typing import Any
@ -57,7 +56,7 @@ def validate_password_strength(password: str) -> None:
raise WeakPasswordError(
"Password must contain at least one number."
)
if not any(c in string.punctuation for c in password):
if not any(not c.isalnum() and not c.isspace() for c in password):
raise WeakPasswordError(
"Password must contain at least one special character."
)

View File

@ -28,11 +28,6 @@ class TestPasswordValidation(unittest.TestCase):
validate_password_strength("NoSpecial123")
self.assertIn("special character", str(ctx.exception))
def test_emoji_instead_of_special_char_fails(self):
with self.assertRaises(WeakPasswordError) as ctx:
validate_password_strength("NoSpecial123😀")
self.assertIn("special character", str(ctx.exception))
def test_valid_passwords_pass(self):
# Must not raise any exceptions
validate_password_strength("Siraj@12345")

View File

@ -68,10 +68,6 @@ class TestPasswordValidationAndHashing:
with pytest.raises(WeakPasswordError, match="special character"):
validate_password_strength("Password 12345")
def test_password_strength_emoji_instead_of_special_char_fails(self) -> None:
with pytest.raises(WeakPasswordError, match="special character"):
validate_password_strength("Password😀12345")
def test_hash_and_verify_password_lifecycle(self) -> None:
raw_pw = "SuperSecure#2026"
hashed = hash_password(raw_pw)