fix logs (and import)

This commit is contained in:
Ross
2026-06-03 21:00:05 +01:00
parent 3d445fe12e
commit 0f11f0800e
6 changed files with 18 additions and 15 deletions
+2 -2
View File
@@ -24,13 +24,13 @@ def test_loguru_uses_django_file_handler_path(settings, tmp_path, monkeypatch):
def test_logs_view_filters_by_date_and_can_reset_log_file(client, admin_user, monkeypatch, tmp_path):
client.force_login(admin_user)
log_file = tmp_path / "log.txt"
log_file = tmp_path / "app.log"
log_file.write_text(
"[03/Jun/2026 10:00:00] INFO [atlas.views:10] first entry\n"
"[03/Jun/2026 11:00:00] ERROR [atlas.views:11] second entry\n",
encoding="utf-8",
)
monkeypatch.setattr("rad.views.settings.BASE_DIR", str(tmp_path))
monkeypatch.setattr("rad.views.get_log_file_path", lambda: log_file)
response = client.get(
reverse("logs_view"),