def test_loggedin(app, login): login() response = app.get('/') # Should redirect to oauth2 assert response.status_int == 302 assert re.search(r'.*oauth2.*', response.headers['Location'])