From ee50c58b61b8d7e9f352de377f82b3cb9c41b3bd Mon Sep 17 00:00:00 2001 From: Bruno Carrez Date: Mon, 30 Sep 2024 20:44:09 -0400 Subject: [PATCH] SARC-292 SARC-293 users exceptions (#103) * fix conftest to comply to exception implementation in sarc/ldap/supervisor.py * conftest exception for delegations and supervisors overrides * test for supervisors overrides * supervisors override implementation * add teacher_delegations in User API * add test for teacher_delegations + lint * remove print * add teachers delegations implementation * fix tests made without exceptions file * lint * fix test_query_to_ldap_server_and_writing_to_output_json (ignore co_supervisor too, there was no case with co_supervisor before exceptions handling was implemented, so the test had to be updated) * updated test_acquire_users_supervisors and test_acquire_users_co_supervisors to use a user not affected by supervisors overrides mock data * lint/black/whatever * lint * Move the supervisors override and prof delegation exceptions to sarc.ldap.users_exceptions.py * fix test `test_load_job_series_with_users` to include the new `teacher_delegations` field in the user collection * lint * fix tests: `test_get_user` and `test_get_users` * update lint exceptions ( disable too-many-positional-arguments ) * fix test `test_acquire_ldap_revision_change` --- pyproject.toml | 1 + sarc/alerts/cache.py | 1 - sarc/alerts/common.py | 1 - sarc/client/users/api.py | 2 + sarc/users/acquire.py | 10 ++ sarc/users/revision.py | 1 + sarc/users/supervisor.py | 1 + sarc/users/users_exceptions.py | 56 +++++++++++ tests/conftest.py | 20 +++- .../cli/acquire/test_acquire_users.py | 93 ++++++++++++++++--- .../test_func_get_user/test_get_user.txt | 1 + .../test_func_get_user/test_get_users.txt | 3 + .../jobs/test_func_load_job_series.py | 1 + .../test_load_job_series_with_users.txt | 52 +++++------ tests/functional/users/test_acquire_ldap.py | 4 +- tests/functional/users/test_read_mila_ldap.py | 1 + 16 files changed, 203 insertions(+), 45 deletions(-) create mode 100644 sarc/users/users_exceptions.py diff --git a/pyproject.toml b/pyproject.toml index 1b84eb67..19afb8e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,6 +70,7 @@ disable = [ "import-outside-toplevel", # These imports are useful to reduce loading times "too-many-arguments", "too-many-locals", + "too-many-positional-arguments", "missing-module-docstring", "missing-class-docstring", "missing-function-docstring", diff --git a/sarc/alerts/cache.py b/sarc/alerts/cache.py index 9f7c9363..a0b11458 100644 --- a/sarc/alerts/cache.py +++ b/sarc/alerts/cache.py @@ -22,7 +22,6 @@ class CachedResult: @dataclass(unsafe_hash=True) class Timespan: - # Time duration duration: timedelta diff --git a/sarc/alerts/common.py b/sarc/alerts/common.py index fe117bb9..97435269 100644 --- a/sarc/alerts/common.py +++ b/sarc/alerts/common.py @@ -315,7 +315,6 @@ class HealthMonitorConfig: checks: dict[str, TaggedSubclass[HealthCheck]] = field(default_factory=dict) def __post_init__(self): - all_checks = {} # Parameterize the checks diff --git a/sarc/client/users/api.py b/sarc/client/users/api.py index 390c550e..269d73bd 100644 --- a/sarc/client/users/api.py +++ b/sarc/client/users/api.py @@ -29,6 +29,8 @@ class User(BaseModel): mila: Credentials drac: Optional[Credentials] + teacher_delegations: Optional[list[str]] = None + mila_ldap: dict drac_members: Optional[dict] drac_roles: Optional[dict] diff --git a/sarc/users/acquire.py b/sarc/users/acquire.py index 7c3f8851..c8d0eecf 100644 --- a/sarc/users/acquire.py +++ b/sarc/users/acquire.py @@ -20,6 +20,10 @@ from sarc.users.mymila import fetch_mymila from sarc.users.read_mila_ldap import fetch_ldap from sarc.users.revision import commit_matches_to_database +from sarc.users.users_exceptions import ( + apply_users_delegation_exceptions, + apply_users_supervisor_exceptions, +) def run( @@ -135,6 +139,12 @@ def run( for _, user in DD_persons_matched.items(): fill_computed_fields(user) + # apply delegation exceptions + apply_users_delegation_exceptions(DD_persons_matched, cfg.ldap, span) + + # apply supervisor exceptions + apply_users_supervisor_exceptions(DD_persons_matched, cfg.ldap, span) + # These associations can now be propagated to the database. span.add_event("Committing matches to database ...") commit_matches_to_database( diff --git a/sarc/users/revision.py b/sarc/users/revision.py index 849552e2..26642b34 100644 --- a/sarc/users/revision.py +++ b/sarc/users/revision.py @@ -114,6 +114,7 @@ def user_insert(newuser: dict) -> list: "mila", "drac_roles", "drac_members", + "teacher_delegations", ) update = { diff --git a/sarc/users/supervisor.py b/sarc/users/supervisor.py index d3b35679..5e3fe635 100644 --- a/sarc/users/supervisor.py +++ b/sarc/users/supervisor.py @@ -177,6 +177,7 @@ def sortkey(x): return sorted(supervisors, key=sortkey, reverse=True) +# pylint: disable=too-many-branches def resolve_supervisors( ldap_people: list[dict], group_to_prof: dict, exceptions: dict ) -> SupervisorMatchingErrors: diff --git a/sarc/users/users_exceptions.py b/sarc/users/users_exceptions.py new file mode 100644 index 00000000..cef0fdf3 --- /dev/null +++ b/sarc/users/users_exceptions.py @@ -0,0 +1,56 @@ +from sarc.config import LDAPConfig +from sarc.users.read_mila_ldap import load_ldap_exceptions + + +def apply_users_delegation_exceptions(DD_persons, ldap_config: LDAPConfig, span): + """ + Apply manual exceptions to users; + these exceptions are defined in the exceptions.json file refered in the LDAPConfig. + """ + span.add_event("Applying users delegation exceptions ...") + # Load exceptions + exceptions = load_ldap_exceptions(ldap_config) + + for _, user in DD_persons.items(): + if ( + exceptions + and user["mila_ldap"]["mila_email_username"] in exceptions["delegations"] + ): + span.add_event( + f"Applying delegation exception for {user['mila_ldap']['mila_email_username']} ..." + ) + user["teacher_delegations"] = exceptions["delegations"][ + user["mila_ldap"]["mila_email_username"] + ] + + +def apply_users_supervisor_exceptions(DD_persons, ldap_config: LDAPConfig, span): + """ + Apply manual exceptions to users; + these exceptions are defined in the exceptions.json file refered in the LDAPConfig. + """ + span.add_event("Applying users supervisor exceptions ...") + # Load exceptions + exceptions = load_ldap_exceptions(ldap_config) + + for _, user in DD_persons.items(): + # if there is a supervisors override, use it whatever the student status may be + if exceptions and user["mila_ldap"]["mila_email_username"] in exceptions.get( + "supervisors_overrides", [] + ): + span.add_event( + f"Applying supervisor exception for {user['mila_ldap']['mila_email_username']} ..." + ) + supervisors = exceptions["supervisors_overrides"][ + user["mila_ldap"]["mila_email_username"] + ] + user["mila_ldap"]["supervisor"] = None + user["mila_ldap"]["co_supervisor"] = None + if len(supervisors) >= 1: + user["mila_ldap"]["supervisor"] = supervisors[0] + else: + user["mila_ldap"]["supervisor"] = None + if len(supervisors) >= 2: + user["mila_ldap"]["co_supervisor"] = supervisors[1] + else: + user["mila_ldap"]["co_supervisor"] = None diff --git a/tests/conftest.py b/tests/conftest.py index 7f259610..073b2e1e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -216,8 +216,24 @@ def file_contents(): """ exceptions_json_path = """ { - "not_prof": [], - "not_student": [] + "not_teacher": [], + "not_student": [], + "delegations": { + "john.smith003@mila.quebec": [ + "john.smith004@mila.quebec", + "john.smith005@mila.quebec" + ] + }, + "supervisors_overrides": { + "john.smith001@mila.quebec": [ + "john.smith003@mila.quebec" + ], + "john.smith002@mila.quebec": [ + "john.smith003@mila.quebec", + "john.smith004@mila.quebec" + ] + } + } """ diff --git a/tests/functional/cli/acquire/test_acquire_users.py b/tests/functional/cli/acquire/test_acquire_users.py index 04f7a235..2ad7cf36 100644 --- a/tests/functional/cli/acquire/test_acquire_users.py +++ b/tests/functional/cli/acquire/test_acquire_users.py @@ -118,6 +118,37 @@ def test_acquire_users(cli_main, patch_return_values, mock_file, captrace): js_user = get_user(drac_account_username="stranger.person") assert js_user is None + # test supervisor overrides + js_user = get_user(mila_email_username="john.smith001@mila.quebec") + assert js_user is not None + assert js_user.mila_ldap["supervisor"] == "john.smith003@mila.quebec" + assert js_user.mila_ldap["co_supervisor"] == None + + js_user = get_user(mila_email_username="john.smith002@mila.quebec") + assert js_user is not None + assert js_user.mila_ldap["supervisor"] == "john.smith003@mila.quebec" + assert js_user.mila_ldap["co_supervisor"] == "john.smith004@mila.quebec" + + # test delegations + # john.smith003 should have delegations for john.smith004 and john.smith005 + # john.smith004 should have no delegations + # john.smith005 should have no delegations + + js_user = get_user(mila_email_username="john.smith003@mila.quebec") + assert js_user is not None + assert js_user.teacher_delegations is not None + assert "john.smith004@mila.quebec" in js_user.teacher_delegations + assert "john.smith005@mila.quebec" in js_user.teacher_delegations + assert "john.smith006@mila.quebec" not in js_user.teacher_delegations + + js_user = get_user(mila_email_username="john.smith004@mila.quebec") + assert js_user is not None + assert js_user.teacher_delegations == None + + js_user = get_user(mila_email_username="john.smith005@mila.quebec") + assert js_user is not None + assert js_user.teacher_delegations == None + # Check traces # NB: We don't check logging here, because # this execution won't display "acquire users" logs, @@ -132,14 +163,28 @@ def test_acquire_users(cli_main, patch_return_values, mock_file, captrace): assert spans[1].name == "match_drac_to_mila_accounts" assert spans[1].status.status_code == StatusCode.OK - assert len(spans[1].events) == 4 + assert len(spans[1].events) == 9 assert ( spans[1].events[0].name == "Loading mila_ldap, drac_roles and drac_members from files ..." ) assert spans[1].events[1].name == "Loading matching config from file ..." assert spans[1].events[2].name == "Matching DRAC/CC to mila accounts ..." - assert spans[1].events[3].name == "Committing matches to database ..." + assert spans[1].events[3].name == "Applying users delegation exceptions ..." + assert ( + spans[1].events[4].name + == "Applying delegation exception for john.smith003@mila.quebec ..." + ) + assert spans[1].events[5].name == "Applying users supervisor exceptions ..." + assert ( + spans[1].events[6].name + == "Applying supervisor exception for john.smith001@mila.quebec ..." + ) + assert ( + spans[1].events[7].name + == "Applying supervisor exception for john.smith002@mila.quebec ..." + ) + assert spans[1].events[8].name == "Committing matches to database ..." @pytest.mark.parametrize( @@ -184,12 +229,16 @@ def test_acquire_users_supervisors( nbr_users = 4 nbr_profs = 2 + # for the test we will use the user with index 3, + # which is the first user who has no supervisor override in the mock data + # so that this test won't be affected by the previous test + patch_return_values( { "sarc.users.read_mila_ldap.query_ldap": fake_raw_ldap_data( nbr_users, hardcoded_values_by_user={ - 2: { # The first user who is not a prof is the one with index 2 + 3: { # The first user who is not a prof is the one with index 3 "supervisor": ldap_supervisor } }, @@ -198,7 +247,7 @@ def test_acquire_users_supervisors( nbr_users=nbr_users, nbr_profs=nbr_profs, hardcoded_values_by_user={ - 2: { # The first user who is not a prof is the one with index 2 + 3: { # The first user who is not a prof is the one with index 3 "Supervisor Principal": mymila_supervisor } }, @@ -221,8 +270,8 @@ def test_acquire_users_supervisors( # Validate the results of all of this by inspecting the database. js_user = get_user( - mila_email_username=f"john.smith002@mila.quebec" - ) # We modified the user with index 2; thus this is the one we retrieve + mila_email_username=f"john.smith003@mila.quebec" + ) # We modified the user with index 3; thus this is the one we retrieve assert js_user.mila_ldap["supervisor"] == expected_supervisor @@ -268,12 +317,16 @@ def test_acquire_users_co_supervisors( nbr_users = 4 nbr_profs = 2 + # for the test we will use the user with index 3, + # which is the first user who has no supervisor override in the mock data + # so that this test won't be affected by the previous test + patch_return_values( { "sarc.users.read_mila_ldap.query_ldap": fake_raw_ldap_data( nbr_users, hardcoded_values_by_user={ - 2: { # The first user who is not a prof is the one with index 2 + 3: { # The first user who is not a prof is the one with index 3 "co_supervisor": ldap_co_supervisor } }, @@ -282,7 +335,7 @@ def test_acquire_users_co_supervisors( nbr_users=nbr_users, nbr_profs=nbr_profs, hardcoded_values_by_user={ - 2: { # The first user who is not a prof is the one with index 2 + 3: { # The first user who is not a prof is the one with index 3 "Co-Supervisor": mymila_co_supervisor } }, @@ -305,8 +358,8 @@ def test_acquire_users_co_supervisors( # Validate the results of all of this by inspecting the database. js_user = get_user( - mila_email_username=f"john.smith002@mila.quebec" - ) # We modified the user with index 2; thus this is the one we retrieve + mila_email_username=f"john.smith003@mila.quebec" + ) # We modified the user with index 3; thus this is the one we retrieve assert js_user.mila_ldap["co_supervisor"] == expected_co_supervisor @@ -411,12 +464,26 @@ def test_acquire_users_prompt( assert spans[1].name == "match_drac_to_mila_accounts" assert spans[1].status.status_code == StatusCode.OK - assert len(spans[1].events) == 5 + assert len(spans[1].events) == 10 assert ( spans[1].events[0].name == "Loading mila_ldap, drac_roles and drac_members from files ..." ) assert spans[1].events[1].name == "Loading matching config from file ..." assert spans[1].events[2].name == "Matching DRAC/CC to mila accounts ..." - assert spans[1].events[3].name == "Committing matches to database ..." - assert spans[1].events[4].name == "Saving 1 manual matches ..." + assert spans[1].events[3].name == "Applying users delegation exceptions ..." + assert ( + spans[1].events[4].name + == "Applying delegation exception for john.smith003@mila.quebec ..." + ) + assert spans[1].events[5].name == "Applying users supervisor exceptions ..." + assert ( + spans[1].events[6].name + == "Applying supervisor exception for john.smith001@mila.quebec ..." + ) + assert ( + spans[1].events[7].name + == "Applying supervisor exception for john.smith002@mila.quebec ..." + ) + assert spans[1].events[8].name == "Committing matches to database ..." + assert spans[1].events[9].name == "Saving 1 manual matches ..." diff --git a/tests/functional/client/test_func_get_user/test_get_user.txt b/tests/functional/client/test_func_get_user/test_get_user.txt index 15f758f1..36270706 100644 --- a/tests/functional/client/test_func_get_user/test_get_user.txt +++ b/tests/functional/client/test_func_get_user/test_get_user.txt @@ -7,6 +7,7 @@ Found user: "active": true }, "drac": null, + "teacher_delegations": null, "mila_ldap": { "co_supervisor": null, "display_name": "M/Ms Bonhomme", diff --git a/tests/functional/client/test_func_get_user/test_get_users.txt b/tests/functional/client/test_func_get_user/test_get_users.txt index 5152c905..9180c913 100644 --- a/tests/functional/client/test_func_get_user/test_get_users.txt +++ b/tests/functional/client/test_func_get_user/test_get_users.txt @@ -7,6 +7,7 @@ Found 3 users(s): "active": true }, "drac": null, + "teacher_delegations": null, "mila_ldap": { "co_supervisor": null, "display_name": "M/Ms Bonhomme", @@ -34,6 +35,7 @@ Found 3 users(s): "email": "petitbonhomme@example.com", "active": true }, + "teacher_delegations": null, "mila_ldap": { "co_supervisor": null, "display_name": "M/Ms Petitbonhomme", @@ -74,6 +76,7 @@ Found 3 users(s): "email": "beaubonhomme@example.com", "active": true }, + "teacher_delegations": null, "mila_ldap": { "co_supervisor": null, "display_name": "M/Ms Beaubonhomme", diff --git a/tests/functional/jobs/test_func_load_job_series.py b/tests/functional/jobs/test_func_load_job_series.py index 847e7173..a3fbc76a 100644 --- a/tests/functional/jobs/test_func_load_job_series.py +++ b/tests/functional/jobs/test_func_load_job_series.py @@ -93,6 +93,7 @@ "user.name", "user.record_start", "user.record_end", + "user.teacher_delegations", "user.mila.username", "user.mila.email", "user.mila.active", diff --git a/tests/functional/jobs/test_func_load_job_series/test_load_job_series_with_users.txt b/tests/functional/jobs/test_func_load_job_series/test_load_job_series_with_users.txt index 1451c56f..1d4505df 100644 --- a/tests/functional/jobs/test_func_load_job_series/test_load_job_series_with_users.txt +++ b/tests/functional/jobs/test_func_load_job_series/test_load_job_series_with_users.txt @@ -1,28 +1,28 @@ Found 4 users and 24 job(s): -| | job_id | cluster_name | user | user.primary_email | user.name | user.record_start | user.record_end | user.mila.username | user.mila.email | user.mila.active | user.drac.username | user.drac.email | user.drac.active | user.mila_ldap.co_supervisor | user.mila_ldap.display_name | user.mila_ldap.mila_cluster_gid | user.mila_ldap.mila_cluster_uid | user.mila_ldap.mila_cluster_username | user.mila_ldap.mila_email_username | user.mila_ldap.status | user.mila_ldap.supervisor | user.drac_members.activation_status | user.drac_members.email | user.drac_members.name | user.drac_members.permission | user.drac_members.sponsor | user.drac_members.username | user.drac_roles.email | user.drac_roles.nom | user.drac_roles.status | user.drac_roles.username | user.drac_roles.état du compte | -|---:|----------:|:---------------|:-------------------|:--------------------------|:-------------------|:--------------------|------------------:|:---------------------|:--------------------------|-------------------:|:---------------------|:--------------------------|-------------------:|-------------------------------:|:------------------------------|----------------------------------:|----------------------------------:|:---------------------------------------|:-------------------------------------|:------------------------|----------------------------:|:--------------------------------------|:--------------------------|:-------------------------|:-------------------------------|:----------------------------|:-----------------------------|:--------------------------|:----------------------|:-------------------------|:---------------------------|:---------------------------------| -| 0 | 1 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 1 | 2 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 2 | 3 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 3 | 4 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 4 | 5 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 5 | 6 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 6 | 7 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 7 | 8 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 8 | 9 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 9 | 10 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 10 | 11 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 11 | 12 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 12 | 13 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 13 | 14 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 14 | 15 | fromage | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 15 | 16 | patate | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 16 | 17 | raisin | bonhomme | bonhomme | nan | NaT | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | -| 17 | 18 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 18 | 19 | mila | grosbonhomme | grosbonhomme | nan | NaT | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | -| 19 | 20 | raisin | beaubonhomme | beaubonhomme@mila.quebec | M/Ms Beaubonhomme | 2024-04-11 00:00:00 | | beaubonhomme_mila | beaubonhomme@mila.quebec | 1 | beaubonhomme | beaubonhomme@example.com | 1 | | M/Ms Beaubonhomme | 1.5e+09 | 1.5e+09 | beaubonhomme | beaubonhomme@mila.quebec | enabled | | activated | beaubonhomme@example.com | M/Ms Beaubonhomme | Manager | BigProf | beaubonhomme | beaubonhomme@example.com | M/Ms Beaubonhomme | Activated | beaubonhomme | activé | -| 20 | 1000000 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 21 | 1000000 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 22 | 23 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | -| 23 | 999999999 | mila | petitbonhomme_mila | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | \ No newline at end of file +| | job_id | cluster_name | user | user.primary_email | user.name | user.record_start | user.record_end | user.teacher_delegations | user.mila.username | user.mila.email | user.mila.active | user.drac.username | user.drac.email | user.drac.active | user.mila_ldap.co_supervisor | user.mila_ldap.display_name | user.mila_ldap.mila_cluster_gid | user.mila_ldap.mila_cluster_uid | user.mila_ldap.mila_cluster_username | user.mila_ldap.mila_email_username | user.mila_ldap.status | user.mila_ldap.supervisor | user.drac_members.activation_status | user.drac_members.email | user.drac_members.name | user.drac_members.permission | user.drac_members.sponsor | user.drac_members.username | user.drac_roles.email | user.drac_roles.nom | user.drac_roles.status | user.drac_roles.username | user.drac_roles.état du compte | +|---:|----------:|:---------------|:-------------------|:--------------------------|:-------------------|:--------------------|------------------:|---------------------------:|:---------------------|:--------------------------|-------------------:|:---------------------|:--------------------------|-------------------:|-------------------------------:|:------------------------------|----------------------------------:|----------------------------------:|:---------------------------------------|:-------------------------------------|:------------------------|----------------------------:|:--------------------------------------|:--------------------------|:-------------------------|:-------------------------------|:----------------------------|:-----------------------------|:--------------------------|:----------------------|:-------------------------|:---------------------------|:---------------------------------| +| 0 | 1 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 1 | 2 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 2 | 3 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 3 | 4 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 4 | 5 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 5 | 6 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 6 | 7 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 7 | 8 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 8 | 9 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 9 | 10 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 10 | 11 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 11 | 12 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 12 | 13 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 13 | 14 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 14 | 15 | fromage | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 15 | 16 | patate | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 16 | 17 | raisin | bonhomme | bonhomme | nan | NaT | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | +| 17 | 18 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 18 | 19 | mila | grosbonhomme | grosbonhomme | nan | NaT | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | +| 19 | 20 | raisin | beaubonhomme | beaubonhomme@mila.quebec | M/Ms Beaubonhomme | 2024-04-11 00:00:00 | | | beaubonhomme_mila | beaubonhomme@mila.quebec | 1 | beaubonhomme | beaubonhomme@example.com | 1 | | M/Ms Beaubonhomme | 1.5e+09 | 1.5e+09 | beaubonhomme | beaubonhomme@mila.quebec | enabled | | activated | beaubonhomme@example.com | M/Ms Beaubonhomme | Manager | BigProf | beaubonhomme | beaubonhomme@example.com | M/Ms Beaubonhomme | Activated | beaubonhomme | activé | +| 20 | 1000000 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 21 | 1000000 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 22 | 23 | raisin | petitbonhomme | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | +| 23 | 999999999 | mila | petitbonhomme_mila | petitbonhomme@mila.quebec | M/Ms Petitbonhomme | 2024-04-11 00:00:00 | | | petitbonhomme_mila | petitbonhomme@mila.quebec | 1 | petitbonhomme | petitbonhomme@example.com | 1 | | M/Ms Petitbonhomme | 1.5e+09 | 1.5e+09 | petitbonhomme | petitbonhomme@mila.quebec | enabled | | activated | petitbonhomme@example.com | M/Ms Petitbonhomme | Manager | BigProf | petitbonhomme | petitbonhomme@example.com | M/Ms Petitbonhomme | Activated | petitbonhomme | activé | \ No newline at end of file diff --git a/tests/functional/users/test_acquire_ldap.py b/tests/functional/users/test_acquire_ldap.py index 8184de63..876fe8a1 100644 --- a/tests/functional/users/test_acquire_ldap.py +++ b/tests/functional/users/test_acquire_ldap.py @@ -76,7 +76,7 @@ def test_acquire_ldap_revision_change(patch_return_values, mock_file): Then, one third acquisition, with no change in the LDAP data. This should result in no change in the database. """ - nbr_users = 3 + nbr_users = 4 patch_return_values( { @@ -110,7 +110,7 @@ def test_acquire_ldap_revision_change(patch_return_values, mock_file): "sarc.users.read_mila_ldap.query_ldap": fake_raw_ldap_data( nbr_users, hardcoded_values_by_user={ - 2: { # The first user who is not a prof is the one with index 2 + 3: { # The first user who is not a prof and not overrided is the one with index 3 "supervisor": "new_supervisor@mila.quebec" } }, diff --git a/tests/functional/users/test_read_mila_ldap.py b/tests/functional/users/test_read_mila_ldap.py index 81d36ca9..30dfe633 100644 --- a/tests/functional/users/test_read_mila_ldap.py +++ b/tests/functional/users/test_read_mila_ldap.py @@ -46,6 +46,7 @@ def test_query_to_ldap_server_and_writing_to_output_json( # resolve_supervisors is not called here e["supervisor"] = None + e["co_supervisor"] = None assert e == processed_user