Skip to content

Commit 9578246

Browse files
Merge pull request #224 from stuartmaxwell:updates
Beta update
2 parents 7d6368e + bcead6b commit 9578246

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[project]
22
name = "stuartm-nz"
3-
version = "0.18.0"
3+
version = "0.19.0b0"
44
description = "stuartm.nz"
55
readme = "README.md"
66
requires-python = ">=3.13"
77
dependencies = [
88
"django-environ>=0.11.2",
99
"django~=5.2.0",
10-
"djpress~=0.18.0",
10+
"djpress~=0.19.0b0",
1111
"whitenoise>=6.7.0",
1212
"gunicorn>=23.0.0",
1313
"rich>=13.8.1",

tests/test_views.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
from django.urls import reverse
77
from django.utils import timezone
88

9+
from djpress.models import Post
10+
911

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

1719

1820
@pytest.mark.django_db
19-
def test_archives(client, test_post1) -> None:
21+
def test_archives(client, test_post1: Post) -> None:
2022
"""Test archives views."""
21-
test_post1.date = timezone.make_aware(timezone.datetime(2024, 6, 1))
23+
test_post1.published_at = timezone.make_aware(timezone.datetime(2024, 6, 1))
2224
test_post1.save()
2325

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

44-
test_post1.date = timezone.make_aware(timezone.datetime(2024, 6, 15))
46+
test_post1.published_at = timezone.make_aware(timezone.datetime(2024, 6, 15))
4547
test_post1.save()
4648
url = "/2024/06/test-post1/"
4749
response: HttpResponse = client.get(url)

uv.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)