Documentation Standardisation & Unit Test Stabilization

- Overhauled README.md to serve as a unified system index and WIP tracker.
- Standardized documentation filenames (ARCH__, GUIDE__, PLAN__) for better discoverability.
- Archived completed project plans and scopes.
- Fixed regressions in unit tests (errors, models, email) caused by V3 architectural updates.
- Ensured unit tests remain non-destructive and environment-independent via mocking.
This commit is contained in:
Scott Idem
2026-01-28 12:15:01 -05:00
parent 3eaf176b05
commit 860cf80a4e
17 changed files with 118 additions and 28 deletions

View File

@@ -27,14 +27,16 @@ def test_error_formatting():
formatted = format_db_error(raw)
print(f"Raw: {raw}")
print(f"Formatted: {formatted}")
if formatted == "Duplicate entry 'abc' for key 'id_random'":
if formatted.category == "database_duplicate" and formatted.code == 1062:
print("✅ Error formatting works.")
else:
print("❌ Error formatting FAILED.")
def test_null_error_handling():
print("\n--- Testing Null Error Handling ---")
if format_db_error(None) == "":
formatted = format_db_error(None)
if formatted.category == "unknown":
print("✅ Null error handled correctly.")
else:
print("❌ Null error check FAILED.")