Add some basic 200 OK smoke tests for key pages
This commit is contained in:
parent
0b8ae2ca77
commit
97b60b44f5
2 changed files with 16 additions and 1 deletions
2
TODO.md
2
TODO.md
|
@ -5,11 +5,11 @@
|
|||
* ask Denver about why so many license files
|
||||
* serve a 400 in Apache for a hostname we don't explicitly support
|
||||
* replace `internalNavigate` with inline flexbox layout
|
||||
* add tests for main pages returning 200
|
||||
|
||||
|
||||
# Done
|
||||
|
||||
* add tests for main pages returning 200
|
||||
* move `SITE_FUNDGOAL` configuration to `settings.py`
|
||||
* move `sponsors.py` and `sponsors.html` into `supporters` app
|
||||
* use `<detail>` elements for supporter page hidden sections, rather than
|
||||
|
|
|
@ -19,7 +19,22 @@ def create_fundraising_goal():
|
|||
fundraiser_endtime=datetime.datetime(2000, 1, 1)
|
||||
)
|
||||
|
||||
# Simple smoke tests to make sure the essential pages on the site are working.
|
||||
get_200_ok_test_data = [
|
||||
'/',
|
||||
'/news/',
|
||||
'/blog/',
|
||||
'/sustainer/',
|
||||
]
|
||||
|
||||
@pytest.mark.parametrize('url', get_200_ok_test_data)
|
||||
@pytest.mark.django_db
|
||||
def test_get_200_ok(url, client):
|
||||
response = client.get(url)
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
# Tests for the template/file content serving functionality.
|
||||
@pytest.mark.django_db
|
||||
def test_about_page_served(rf):
|
||||
create_fundraising_goal()
|
||||
|
|
Loading…
Reference in a new issue