lemoncurry/entries/tests/views/feeds.py

30 lines
772 B
Python
Raw Permalink Normal View History

import pytest
@pytest.mark.django_db
def test_atom(client):
2023-08-10 02:52:37 -04:00
res = client.get("/atom")
assert res.status_code == 200
2023-08-10 02:52:37 -04:00
assert res["Content-Type"] == "application/atom+xml; charset=utf-8"
@pytest.mark.django_db
def test_rss(client):
2023-08-10 02:52:37 -04:00
res = client.get("/rss")
assert res.status_code == 200
2023-08-10 02:52:37 -04:00
assert res["Content-Type"] == "application/rss+xml; charset=utf-8"
@pytest.mark.django_db
def test_atom_by_kind(client):
2023-08-10 02:52:37 -04:00
res = client.get("/notes/atom")
assert res.status_code == 200
2023-08-10 02:52:37 -04:00
assert res["Content-Type"] == "application/atom+xml; charset=utf-8"
@pytest.mark.django_db
def test_rss_by_kind(client):
2023-08-10 02:52:37 -04:00
res = client.get("/notes/rss")
assert res.status_code == 200
2023-08-10 02:52:37 -04:00
assert res["Content-Type"] == "application/rss+xml; charset=utf-8"