ucfopen / canvasapi

Python API wrapper for Instructure's Canvas LMS. Easily manage courses, users, gradebooks, and more.
https://pypi.python.org/pypi/canvasapi
MIT License
554 stars 173 forks source link

Pass through optional parameters in get_profile() #543

Closed breed closed 1 year ago

breed commented 2 years ago

Proposed Changes

breed commented 2 years ago

i'm a little unclear how to write a test case for this. l looked at the get_profile test case but i'm not sure how to mock the optional parameters.

bennettscience commented 2 years ago

The update looks okay. The Canvas docs don't show any keys to use in the request, but testing include[]=links in Postman returned a links key in the response.

As far as writing tests, none of the other methods which accept kwargs pass in values, so as long as your tests are passing locally, it should be okay. Since it's your first contribution, the automated checks won't run until @Thetwam or @jessemcbride manually run them.

breed commented 2 years ago

i can confirm that it works. i'm using it in this project https://github.com/breed/kattis2canvas to hook kattis to canvas.

codecov[bot] commented 1 year ago

Codecov Report

Merging #543 (de2cb2d) into develop (537128d) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##           develop      #543   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           69        69           
  Lines         3650      3650           
=========================================
  Hits          3650      3650           
Impacted Files Coverage Δ
canvasapi/user.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more