Skip to content

feat(groups): add a list_ldap_group_links to go along with the pre ex… - #2371

Merged
nejch merged 7 commits into
python-gitlab:mainfrom
rayisbadat:feat/list_ldap_group_sync
Nov 16, 2022
Merged

feat(groups): add a list_ldap_group_links to go along with the pre ex…#2371
nejch merged 7 commits into
python-gitlab:mainfrom
rayisbadat:feat/list_ldap_group_sync

Conversation

@rayisbadat

Copy link
Copy Markdown
Contributor
feat(groups): add a list_ldap_group_links to go along with the pre existing add_ldap_group_link and delete_ldap_group_link

Comment thread gitlab/v4/objects/groups.py Outdated
Comment thread gitlab/v4/objects/groups.py Outdated
@codecov-commenter

codecov-commenter commented Nov 9, 2022

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.97%. Comparing base (a0553c2) to head (6194085).
⚠️ Report is 702 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2371   +/-   ##
=======================================
  Coverage   95.97%   95.97%           
=======================================
  Files          80       80           
  Lines        5313     5318    +5     
=======================================
+ Hits         5099     5104    +5     
  Misses        214      214           
Flag Coverage Δ
api_func_v4 83.58% <60.00%> (-0.03%) ⬇️
cli_func_v4 82.43% <60.00%> (-0.03%) ⬇️
unit 87.85% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
gitlab/v4/objects/groups.py 89.74% <100.00%> (+0.33%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread gitlab/v4/objects/groups.py Outdated
@rayisbadat
rayisbadat force-pushed the feat/list_ldap_group_sync branch from a4456be to 858dd8b Compare November 10, 2022 16:34
@JohnVillalovos
JohnVillalovos self-requested a review November 10, 2022 20:31

@lmilbaum lmilbaum left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lmilbaum lmilbaum left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a unit test?

@rayisbadat

Copy link
Copy Markdown
Contributor Author

@lmilbaum Could you please add a unit test?

I added a unit test and tox passed. But this my first time doing such a thing. So if its not right , I might need a little help on whats needed.

@nejch nejch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lmilbaum Could you please add a unit test?

I added a unit test and tox passed. But this my first time doing such a thing. So if its not right , I might need a little help on whats needed.

@rayisbadat it's a great start! You've added a test fixture, which you can now use to also create a test case, for example def test_list_ldap_group_links(group, resp_list_ldap_group_links):.

It will look a bit like this existing test, but without the isinstance assert probably:

def test_list_group_projects(group, resp_list_group_projects):
projects = group.projects.list()
assert isinstance(projects[0], GroupProject)
assert projects[0].path == projects_content[0]["path"]

Just a small tip, we usually put all the fixtures (things decorated with @pytest.fixture) at the top of the module, and test cases (def test_*) after them.

@rayisbadat
rayisbadat force-pushed the feat/list_ldap_group_sync branch from 7a81117 to 6194085 Compare November 16, 2022 16:31
@nejch

nejch commented Nov 16, 2022

Copy link
Copy Markdown
Member

@JohnVillalovos I think you wanted to have another look at this?

@JohnVillalovos JohnVillalovos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nejch Looks good to me, though would like it to be squashed when it is merged in.

@nejch
nejch merged commit ad7c8fa into python-gitlab:main Nov 16, 2022
@nejch

nejch commented Nov 16, 2022

Copy link
Copy Markdown
Member

Thanks everyone. I did a squash and merge @JohnVillalovos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants