def test_main_css(self): response = client.get('/static/main.css') assert response.status_code == 200 assert 'text/css' in response.headers.get('Content-Type')
def test_404_js(self): response = client.get('/static/404.js') assert response.status_code == 200 assert 'application/javascript' in response.headers.get('Content-Type')
def test_404_template(self): response = client.get('/routethatdoesntexist') assert response.status_code == 404 assert 'text/html' in response.headers.get('Content-Type') assert response.template.name == '404.html'
def test_index_template(self): response = client.get('/') assert response.status_code == 200 assert 'text/html' in response.headers.get('Content-Type') assert response.template.name == 'index.html'
def test_dashboard_template(self): response = client.get('/dashboard') assert response.status_code == 200 assert 'text/html' in response.headers.get('Content-Type') assert response.template.name == 'dashboard.html'