diff options
| author | Dennis Fink | 2026-08-19 19:49:55 +0200 |
|---|---|---|
| committer | Dennis Fink | 2026-08-19 19:49:55 +0200 |
| commit | d0e245d63e014d268310976fc45429f08d2cbbe9 (patch) | |
| tree | ef2e96570723190baf02f05c2c4644a19ff1af78 /tests/test_views.py | |
| parent | d4a03623544aac0ce911d8471ff4b033bc3255e1 (diff) | |
| download | webmentions-ssg-d0e245d63e014d268310976fc45429f08d2cbbe9.tar.gz webmentions-ssg-d0e245d63e014d268310976fc45429f08d2cbbe9.zip | |
refactor(core): improve typing and test coverage
Restructure database and user CLI commands, make passwords write-only
model properties, and use the UTC datetime constant throughout the
application.
Add PEP 287-style documentation and expand receiver, scanner, sender,
and URL security tests to cover error paths and edge cases.
Diffstat (limited to '')
| -rw-r--r-- | tests/test_views.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_views.py b/tests/test_views.py index aac281e..67ed190 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -1,5 +1,5 @@ import uuid -from datetime import datetime, timezone +from datetime import UTC, datetime from unittest.mock import Mock, call, patch import pytest @@ -19,7 +19,7 @@ from webmentions_ssg.models import ( def log_in(app: Flask, client: FlaskClient) -> None: with app.app_context(): - user = User(username="admin") + user = User(username="admin", password="test") db.session.add(user) db.session.commit() @@ -32,7 +32,7 @@ def log_in(app: Flask, client: FlaskClient) -> None: def create_sent_source(app: Flask) -> uuid.UUID: - now = datetime.now(timezone.utc) + now = datetime.now(UTC) with app.app_context(): source = Source( |
