Skip to content

test: Adds extensive test for the client and fixed alert endpoint#240

Merged
frgfm merged 5 commits into
mainfrom
client-test
Jan 14, 2023
Merged

test: Adds extensive test for the client and fixed alert endpoint#240
frgfm merged 5 commits into
mainfrom
client-test

Conversation

@frgfm

@frgfm frgfm commented Jan 14, 2023

Copy link
Copy Markdown
Member

This PR introduces the following modifications:

  • adds extensive tests for the client
  • fixes a rare case on the alert endpoint (when azimuth is not specified, it defaults to the value of the device that created the alert, but if for some reason, the device azimuth is None, that creates an internal error)
  • deprecates the following client methods: update_my_location, create_event, create_no_alert_site, send_alert, create_media, get_media_url_and_read
  • renamed the following client methods: get_my_devices --> get_user_devices, get_my_device -> get_self_device
  • updates precommit hooks

Closes #224

@codecov

codecov Bot commented Jan 14, 2023

Copy link
Copy Markdown

Codecov Report

Merging #240 (6f09880) into main (16edc54) will increase coverage by 1.92%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##             main     #240      +/-   ##
==========================================
+ Coverage   92.64%   94.56%   +1.92%     
==========================================
  Files          61       61              
  Lines        1442     1418      -24     
==========================================
+ Hits         1336     1341       +5     
+ Misses        106       77      -29     
Flag Coverage Δ
client 100.00% <100.00%> (+30.92%) ⬆️
unittests 94.28% <50.00%> (-0.07%) ⬇️

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

Impacted Files Coverage Δ
src/app/api/endpoints/alerts.py 96.61% <50.00%> (-1.64%) ⬇️
client/pyroclient/client.py 100.00% <100.00%> (+32.18%) ⬆️
client/pyroclient/exceptions.py 100.00% <0.00%> (+25.00%) ⬆️

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

@frgfm
frgfm merged commit 45f17be into main Jan 14, 2023
@frgfm
frgfm deleted the client-test branch January 14, 2023 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[client] All client methods are not tested

1 participant