tests: adapt authentic deployment tests to new default roles (#36615)

This commit is contained in:
Paul Marillonnet 2019-10-02 13:52:52 +02:00
parent 848ce782ef
commit d292cb96f4
1 changed files with 5 additions and 5 deletions

View File

@ -405,11 +405,11 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir):
for meta, service in zip(metadatas, other_services):
provider = LibertyProvider.objects.get(slug=service['slug'])
assert provider.metadata == meta
# Two services loaded roles.json, so there must be 4 roles associated
# to their "ou" excluding their superuser role, 2 admin roles for users
# and roles, a 2 loaded roles, petite enfance and état-civil
# Two services loaded roles.json, so there must be 5 roles associated
# to their "ou" excluding their superuser role, 3 admin roles for users,
# roles and services, and 2 loaded roles, petite enfance and état-civil
assert Role.objects.filter(ou__isnull=False,
service__isnull=True).count() == 8
service__isnull=True).count() == 10
for service_id in set(s['service-id'] for s in other_services):
same_services = [s for s in other_services
if s['service-id'] == service_id]
@ -453,7 +453,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir):
attribute_name='a2_service_ou_role_uuids').count() == 1
if service.get('template_name'):
assert Role.objects.filter(
ou=provider.ou, service__isnull=True).count() == 4
ou=provider.ou, service__isnull=True).count() == 5
assert Role.objects.filter(
ou=provider.ou, service__isnull=True,
name=u'Service petite enfance').count() == 1