add page modified time to the template

This commit is contained in:
2020-03-07 15:39:12 -06:00
parent 75f8488fc3
commit 04145e92f8
3 changed files with 16 additions and 1 deletions

View File

@@ -1,4 +1,6 @@
"""Test page views and helper methods."""
import re
from incorporealcms.pages import page_file_resolver
@@ -36,3 +38,9 @@ def test_page_without_title_metadata(client):
assert response.status_code == 200
assert b'<title>incorporeal.org</title>' in response.data
assert b'<h1>this page doesn\'t have a title!</h1>' in response.data
def test_page_has_modified_timestamp(client):
response = client.get('/')
assert response.status_code == 200
assert re.search(r'Last modified: ....-..-.. ..:..:.. ...', response.data.decode()) is not None