Skip to content

Commit

Permalink
apply readability suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: richardmaw-codethink <richard.maw@codethink.co.uk>
  • Loading branch information
thinkl33t and richardmaw-codethink committed Dec 8, 2023
1 parent 13bd2a3 commit 328b590
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions tests/test_target_suitecrm.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,8 @@ def test_user_delete(basic_target, suitecrm_server):

basic_target.users_cleanup(diff)
users = server.search_by_type("User")
assert users[0]["attributes"]["first_name"] == "Ad"
assert users[1]["attributes"]["first_name"] == "Ernie"
assert any(user["attributes"]["first_name"] == "Ad" for user in users)
assert any(user["attributes"]["first_name"] == "Ernie" for user in users)


def test_users_disable(users_disable_target, suitecrm_server):
Expand Down Expand Up @@ -494,12 +494,21 @@ def test_users_disable(users_disable_target, suitecrm_server):

users_disable_target.users_cleanup(diff)
users = server.search_by_type("User")
assert users[0]["attributes"]["first_name"] == "Ad"
assert users[0]["attributes"]["status"] == "Active"
assert users[1]["attributes"]["first_name"] == "Basic"
assert users[1]["attributes"]["status"] == "Inactive"
assert users[2]["attributes"]["first_name"] == "Ernie"
assert users[2]["attributes"]["status"] == "Active"
assert any(
user["attributes"]["first_name"] == "Ad"
and user["attributes"]["status"] == "Active"
for user in users
)
assert any(
user["attributes"]["first_name"] == "Basic"
and user["attributes"]["status"] == "Inactive"
for user in users
)
assert any(
user["attributes"]["first_name"] == "Ernie"
and user["attributes"]["status"] == "Active"
for user in users
)


def test_groups_emails_sync_no_changes(basic_config, suitecrm_server):
Expand Down

0 comments on commit 328b590

Please sign in to comment.