''' functional tests for ordr2.views.pages ''' from . import testappsetup, testapp # noqa: F401 def test_welcome(testapp): # noqa: F811 ''' test the redirects on web root ''' response = testapp.get('/') assert response.location == 'http://localhost/account/login' testapp.login('TerryGilliam', 'Terry') response = testapp.get('/') assert response.location == 'http://localhost/orders' def test_faq(testapp): # noqa: F811 ''' test the faq page ''' response = testapp.get('/faq') active = response.html.find('li', class_='active') assert active.a['href'] == 'http://localhost/faq'