Merge pull request #18 from morbidrsa/test-static-pages

Test static pages
pull/20/head
Johannes Thumshirn 4 years ago committed by GitHub
commit a7edb8fb5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,17 +7,14 @@ import sys
import pytest
import pytest_cov.embed
def test_static_pages():
def test_static_pages(app, client):
for f in os.listdir('templates'):
if f == "template.html" or f == "page.html":
continue
static_file = f.split('.',1)[0]
print("Checking presence of method: ", static_file)
try:
method = getattr(app, static_file)
assert True
except NotImplementedError:
assert False
page = "/" + static_file + ".html"
print("Checking presence of: ", page)
res = client.get(page)
assert res.status_code == 200

Loading…
Cancel
Save