Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[project]
name = "stuartm-nz"
version = "0.18.0"
version = "0.19.0b0"
description = "stuartm.nz"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"django-environ>=0.11.2",
"django~=5.2.0",
"djpress~=0.18.0",
"djpress~=0.19.0b0",
"whitenoise>=6.7.0",
"gunicorn>=23.0.0",
"rich>=13.8.1",
Expand Down
10 changes: 6 additions & 4 deletions tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from django.urls import reverse
from django.utils import timezone

from djpress.models import Post


@pytest.mark.django_db
def test_index(client, test_post1) -> None:
Expand All @@ -16,9 +18,9 @@ def test_index(client, test_post1) -> None:


@pytest.mark.django_db
def test_archives(client, test_post1) -> None:
def test_archives(client, test_post1: Post) -> None:
"""Test archives views."""
test_post1.date = timezone.make_aware(timezone.datetime(2024, 6, 1))
test_post1.published_at = timezone.make_aware(timezone.datetime(2024, 6, 1))
test_post1.save()

url = "/2024/"
Expand All @@ -35,13 +37,13 @@ def test_archives(client, test_post1) -> None:
@pytest.mark.django_db
def test_single_post(client, test_post1) -> None:
"""Test single post view."""
url = f"/{test_post1.date.year}/{test_post1.date.month:02}/test-post1/"
url = f"/{test_post1._date.year}/{test_post1._date.month:02}/test-post1/"
# response: HttpResponse = client.get(url)
# assert test_post1.url == "/2025/04/test-post1/"
# assert response.status_code == 200
# assert "Test Post1" in str(response.content)

test_post1.date = timezone.make_aware(timezone.datetime(2024, 6, 15))
test_post1.published_at = timezone.make_aware(timezone.datetime(2024, 6, 15))
test_post1.save()
url = "/2024/06/test-post1/"
response: HttpResponse = client.get(url)
Expand Down
10 changes: 5 additions & 5 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.