website/website/legacy/tests.py
Jake Howard e5ae66567a
Unify RSS feeds
One per section is a little much. Just use a single feed and be done with. Might help discoverability a little.
2023-12-22 17:42:29 +00:00

17 lines
546 B
Python

from django.test import TestCase
from django.urls import reverse
class AllPagesFeedViewTestCase(TestCase):
def test_redirects(self) -> None:
response = self.client.get("/index.xml")
self.assertRedirects(
response, reverse("feed"), status_code=301, fetch_redirect_response=True
)
def test_redirects_posts(self) -> None:
response = self.client.get("/posts/index.xml")
self.assertRedirects(
response, reverse("feed"), status_code=301, fetch_redirect_response=True
)