agent/authentic: include “multiple” attribute flag on deploy (#86672)

This commit is contained in:
Paul Marillonnet 2024-02-08 09:48:18 +01:00
parent 5cd0c97efe
commit 3bc371ad24
2 changed files with 14 additions and 0 deletions

View File

@ -83,6 +83,7 @@ class Command(hobo_deploy.Command):
'user_visible',
'required',
'searchable',
'multiple',
'disabled',
'required_on_login',
):

View File

@ -154,6 +154,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir, tmp_path):
'user_editable': True,
'asked_on_registration': False,
'name': 'title',
'multiple': False,
},
{
'kind': 'string',
@ -165,6 +166,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir, tmp_path):
'user_editable': True,
'asked_on_registration': True,
'name': 'first_name',
'multiple': False,
},
{
'kind': 'string',
@ -176,6 +178,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir, tmp_path):
'user_editable': True,
'asked_on_registration': True,
'name': 'last_name',
'multiple': False,
},
{
'kind': 'email',
@ -187,6 +190,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir, tmp_path):
'user_editable': True,
'asked_on_registration': False,
'name': 'email',
'multiple': False,
},
{
'kind': 'string',
@ -198,6 +202,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir, tmp_path):
'user_editable': True,
'asked_on_registration': False,
'name': 'address',
'multiple': False,
},
{
'kind': 'string',
@ -209,6 +214,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir, tmp_path):
'user_editable': True,
'asked_on_registration': False,
'name': 'zipcode',
'multiple': False,
},
{
'kind': 'string',
@ -220,6 +226,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir, tmp_path):
'user_editable': True,
'asked_on_registration': False,
'name': 'city',
'multiple': False,
},
{
'kind': 'phone_number',
@ -231,6 +238,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir, tmp_path):
'user_editable': True,
'asked_on_registration': False,
'name': 'phone',
'multiple': False,
},
{
'kind': 'fr_phone_number',
@ -242,6 +250,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir, tmp_path):
'user_editable': True,
'asked_on_registration': False,
'name': 'fr_phone',
'multiple': False,
},
{
'kind': 'string',
@ -253,6 +262,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir, tmp_path):
'user_editable': True,
'asked_on_registration': False,
'name': 'country',
'multiple': True,
},
{
'kind': 'birthdate',
@ -264,6 +274,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir, tmp_path):
'user_editable': True,
'asked_on_registration': False,
'name': 'birthdate',
'multiple': False,
},
{
'kind': 'boolean',
@ -276,6 +287,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir, tmp_path):
'asked_on_registration': True,
'required_on_login': True,
'name': 'cgu',
'multiple': False,
},
]
},
@ -415,6 +427,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir, tmp_path):
assert at.user_visible == field['user_visible']
assert at.user_editable == field['user_editable']
assert at.required_on_login == field.get('required_on_login', False)
assert at.multiple == field['multiple']
for at in Attribute.all_objects.all():
assert [field for field in env['profile']['fields'] if field['name'] == at.name]