Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/test coverage #42

Merged
merged 9 commits into from
Oct 3, 2022
Merged

Feature/test coverage #42

merged 9 commits into from
Oct 3, 2022

Conversation

samamorgan
Copy link
Collaborator

Increase test coverage

@samamorgan samamorgan changed the base branch from main to develop September 16, 2022 22:28
Base automatically changed from develop to main September 16, 2022 23:10
@samamorgan samamorgan changed the base branch from main to develop October 3, 2022 18:39
@codecov
Copy link

codecov bot commented Oct 3, 2022

Codecov Report

Base: 94.81% // Head: 95.51% // Increases project coverage by +0.69% 🎉

Coverage data is based on head (2708384) compared to base (34dd435).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #42      +/-   ##
===========================================
+ Coverage    94.81%   95.51%   +0.69%     
===========================================
  Files           32       34       +2     
  Lines         1409     1472      +63     
===========================================
+ Hits          1336     1406      +70     
+ Misses          73       66       -7     
Impacted Files Coverage Δ
test/test_exception.py 100.00% <100.00%> (ø)
test/test_util.py 100.00% <100.00%> (ø)
welkin/util.py 100.00% <100.00%> (+13.51%) ⬆️
welkin/exceptions.py 100.00% <0.00%> (+16.66%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@edcohen08 edcohen08 left a comment

Choose a reason for hiding this comment

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

All LGTM! Left one question



@pytest.mark.vcr()
def test_exception(client):
Copy link
Contributor

Choose a reason for hiding this comment

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

would we want to have a test actually against Welkin or does it not matter?

Copy link
Collaborator Author

@samamorgan samamorgan Oct 3, 2022

Choose a reason for hiding this comment

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

test_exception does actually hit the Welkin API at https://api.live.welkincloud.io/{{ tenant }}/admin/users/me, which is a real endpoint that IIRC isn't allowed for API clients.

I'm pointing test_exception_no_json because I don't know of a Welkin endpoint that returns a blank or text-based response (it has happened, I just don't recall when), and httpbin.org is a tried-and-true test domain. This also illustrates how the underlying client can be used without the defined object models. IMO tests should also illustrate usage.

@samamorgan samamorgan merged commit a666fa9 into develop Oct 3, 2022
@samamorgan samamorgan deleted the feature/test-coverage branch October 3, 2022 22:25
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.

2 participants