Skip to content

Commit

Permalink
fix test_query_to_ldap_server_and_writing_to_output_json (ignore co_s…
Browse files Browse the repository at this point in the history
…upervisor too, there was no case with co_supervisor before exceptions handling was implemented, so the test had to be updated)
  • Loading branch information
nurbal committed Mar 1, 2024
1 parent f206155 commit 10a720a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions tests/functional/ldap/test_functional_revision.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def user_with_history(username):

@pytest.mark.usefixtures("write_setup")
def test_get_user_fetch_latest():

user_with_history("user1")

#
Expand Down Expand Up @@ -140,7 +139,6 @@ def test_update_status_nodb_snapshots(status):
@pytest.mark.usefixtures("write_setup")
@pytest.mark.parametrize("status", statuses)
def test_update_status_db_nosnapshots(status):

collection = users_collection().get_collection()
update_user(collection, make_user(status))
users = user_dict([])
Expand Down Expand Up @@ -171,7 +169,6 @@ def test_update_status_db_nosnapshots(status):
@pytest.mark.usefixtures("write_setup")
@pytest.mark.parametrize("start,end", transitions())
def test_update_status_users_exists_on_both(start, end):

collection = users_collection().get_collection()
update_user(collection, make_user(start, record_start=datetime(2000, 1, 1)))
documents_before = list(collection.find({}))
Expand Down
1 change: 1 addition & 0 deletions tests/functional/ldap/test_read_mila_ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def mock_query_ldap(

# resolve_supervisors is not called here
e["supervisor"] = None
e["co_supervisor"] = None

assert e == processed_user

Expand Down
1 change: 0 additions & 1 deletion tests/unittests/ldap/test_backfill.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def userhistory(email, history):
latest_record = base_user

for start, fields in history:

if prev_fields is not None:
prev_fields["End Date with MILA"] = start
latest_record = dictset(latest_record, prev_fields)
Expand Down
1 change: 0 additions & 1 deletion tests/unittests/ldap/test_revision.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ def test_ldap_update_status_db_noldap(status):

@pytest.mark.parametrize("start,end", transitions())
def test_ldap_update_status_users_exists_on_both(start, end):

collection = MockCollection(
[STANDARD_USER, make_user(start, record_start=datetime(2000, 1, 1))]
)
Expand Down

0 comments on commit 10a720a

Please sign in to comment.