Skip to content

test(projects): add unit tests for projects - #2069

Merged
nejch merged 3 commits into
python-gitlab:mainfrom
antoineauger:test/unit-tests-projects
Jun 29, 2022
Merged

test(projects): add unit tests for projects#2069
nejch merged 3 commits into
python-gitlab:mainfrom
antoineauger:test/unit-tests-projects

Conversation

@antoineauger

@antoineauger antoineauger commented Jun 14, 2022

Copy link
Copy Markdown
Contributor

Closes #1708

🛠️ with ❤️ by Siemens

@antoineauger
antoineauger force-pushed the test/unit-tests-projects branch 2 times, most recently from 0ab434d to cde78a9 Compare June 15, 2022 16:17
@antoineauger
antoineauger force-pushed the test/unit-tests-projects branch from cde78a9 to 67942f0 Compare June 16, 2022 08:53
Comment thread tests/unit/objects/test_projects.py
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #2069 (67942f0) into main (ca98d88) will increase coverage by 0.61%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2069      +/-   ##
==========================================
+ Coverage   94.64%   95.26%   +0.61%     
==========================================
  Files          78       78              
  Lines        5003     5003              
==========================================
+ Hits         4735     4766      +31     
+ Misses        268      237      -31     
Flag Coverage Δ
cli_func_v4 82.45% <ø> (ø)
py_func_v4 81.03% <ø> (ø)
unit 86.78% <ø> (+1.17%) ⬆️

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

Impacted Files Coverage Δ
gitlab/v4/objects/push_rules.py 100.00% <0.00%> (+6.66%) ⬆️
gitlab/v4/objects/projects.py 100.00% <0.00%> (+10.06%) ⬆️

Comment thread tests/unit/objects/test_projects.py
@antoineauger
antoineauger marked this pull request as ready for review June 16, 2022 09:04
Comment thread tests/unit/objects/test_projects.py
@antoineauger

antoineauger commented Jun 16, 2022

Copy link
Copy Markdown
Contributor Author

@nejch Here is a first try to reach the 100% coverage for projects/push_rules objects 😄

🏓

@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.

Thanks a lot for all the work here @antoineauger 😮 I left only some tiny comment but it's non-blocking. I think we can leave the duplicate for now as we have to do more cleanup in other parts.

I realize adding the response fixtures now is quite tedious, will probably need to think of some lightweight wrappers to make it more manageable.

Comment thread tests/unit/objects/test_projects.py Outdated
Comment thread tests/unit/objects/test_projects.py
Comment thread tests/unit/objects/test_projects.py Outdated
Comment thread tests/unit/objects/test_projects.py
@antoineauger

antoineauger commented Jun 29, 2022

Copy link
Copy Markdown
Contributor Author

Thanks a lot for all the work here @antoineauger open_mouth I left only some tiny comment but it's non-blocking. I think we can leave the duplicate for now as we have to do more cleanup in other parts.

I realize adding the response fixtures now is quite tedious, will probably need to think of some lightweight wrappers to make it more manageable.

Thanks for the valuable feedback @nejch, I think I addressed all your remarks. Back to you for final check 🏓

@antoineauger
antoineauger requested a review from nejch June 29, 2022 09:02

@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.

Looks great, thanks again @antoineauger! Really happy to see this done, it was open for a long time :)

@nejch
nejch merged commit 0e4db56 into python-gitlab:main Jun 29, 2022
@antoineauger
antoineauger deleted the test/unit-tests-projects branch June 29, 2022 09:44
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.

Tests need to be implemented for tests/unit/test_projects.py

4 participants