Add tests for the Atom/RSS feeds so I won't accidentally break 'em without realising again

This commit is contained in:
Danielle McLean 2018-05-09 21:36:21 +10:00
parent 4945b40810
commit dd0951cc82
Signed by: 00dani
GPG key ID: 8EB789DDF3ABD240
3 changed files with 29 additions and 0 deletions

View file

View file

View file

@ -0,0 +1,29 @@
import pytest
@pytest.mark.django_db
def test_atom(client):
res = client.get('/atom')
assert res.status_code == 200
assert res['Content-Type'] == 'application/atom+xml; charset=utf-8'
@pytest.mark.django_db
def test_rss(client):
res = client.get('/rss')
assert res.status_code == 200
assert res['Content-Type'] == 'application/rss+xml; charset=utf-8'
@pytest.mark.django_db
def test_atom_by_kind(client):
res = client.get('/notes/atom')
assert res.status_code == 200
assert res['Content-Type'] == 'application/atom+xml; charset=utf-8'
@pytest.mark.django_db
def test_rss_by_kind(client):
res = client.get('/notes/rss')
assert res.status_code == 200
assert res['Content-Type'] == 'application/rss+xml; charset=utf-8'