Add tests for the Atom/RSS feeds so I won't accidentally break 'em without realising again
This commit is contained in:
parent
4945b40810
commit
dd0951cc82
3 changed files with 29 additions and 0 deletions
0
entries/tests/__init__.py
Normal file
0
entries/tests/__init__.py
Normal file
0
entries/tests/views/__init__.py
Normal file
0
entries/tests/views/__init__.py
Normal file
29
entries/tests/views/feeds.py
Normal file
29
entries/tests/views/feeds.py
Normal 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'
|
Loading…
Reference in a new issue