diff --git a/tests/test_category_cache.py b/tests/test_cache_category.py similarity index 100% rename from tests/test_category_cache.py rename to tests/test_cache_category.py diff --git a/tests/test_published_posts_cache.py b/tests/test_cache_published_posts.py similarity index 100% rename from tests/test_published_posts_cache.py rename to tests/test_cache_published_posts.py diff --git a/tests/test_post_authors.py b/tests/test_post_authors.py deleted file mode 100644 index c14c06b..0000000 --- a/tests/test_post_authors.py +++ /dev/null @@ -1,33 +0,0 @@ -import pytest -from django.contrib.auth.models import User -from djpress.models import Post - - -@pytest.mark.django_db -def test_get_published_posts_by_author(): - # Create a test user - user = User.objects.create_user(username="testuser", password="testpass") - - # Create some published posts by the test user - post1 = Post.post_objects.create( - title="Post 1", content="Content of post 1.", author=user, status="published" - ) - post2 = Post.post_objects.create( - title="Post 2", content="Content of post 2.", author=user, status="published" - ) - - # Create a draft post by the test user - draft_post = Post.post_objects.create( - title="Draft Post", - content="Content of draft post.", - author=user, - status="draft", - ) - - # Call the method being tested - published_posts = Post.post_objects.get_published_posts_by_author(user) - - # Assert that only the published posts by the test user are returned - assert post1 in published_posts - assert post2 in published_posts - assert draft_post not in published_posts diff --git a/tests/test_djpress_tags.py b/tests/test_templatetags_djpress_tags.py similarity index 100% rename from tests/test_djpress_tags.py rename to tests/test_templatetags_djpress_tags.py