tests: adapt as "User Profile" is not always displayed anymore (#33441)
This commit is contained in:
parent
9343d3cd6c
commit
157358dbef
|
@ -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/')
|
||||
|
|
Loading…
Reference in New Issue