From 157358dbef5d66b18c1bf4adf1f649f3d9f1a53f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 21 Jun 2019 11:28:49 +0200 Subject: [PATCH] tests: adapt as "User Profile" is not always displayed anymore (#33441) --- tests/test_manager.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_manager.py b/tests/test_manager.py index c1e3c32..e4e211a 100644 --- a/tests/test_manager.py +++ b/tests/test_manager.py @@ -8,6 +8,7 @@ import pytest from webtest import TestApp from hobo.profile import models +from hobo.environment.models import Authentic from hobo.wsgi import application pytestmark = pytest.mark.django_db @@ -37,10 +38,14 @@ def test_unlogged_access(): def test_access(admin_user): app = login(TestApp(application)) resp = app.get('/', status=200) - assert 'User Profile' in resp.body + assert 'User Profile' not in resp.body assert 'Services' in resp.body assert 'Variables' in resp.body + Authentic(title='bar', slug='bar', base_url='http://bar.example.net').save() + resp = app.get('/', status=200) + assert 'User Profile' in resp.body + def test_logout(admin_user): app = login(TestApp(application)) app.get('/logout/')