Skip to content

Conversation

drc38
Copy link
Collaborator

@drc38 drc38 commented Feb 12, 2022

If post_connect always triggers a charger issue eg disconnect this may cause continuous reconnects

If post_connect always triggers a charger issue eg disconnect this may cause continuous reconnects
@codecov
Copy link

codecov bot commented Feb 12, 2022

Codecov Report

Merging #392 (2d0b95c) into main (a1f71c1) will decrease coverage by 0.14%.
The diff coverage is 54.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #392      +/-   ##
==========================================
- Coverage   89.15%   89.00%   -0.15%     
==========================================
  Files          10       10              
  Lines        1208     1210       +2     
  Branches      181      182       +1     
==========================================
  Hits         1077     1077              
- Misses         70       71       +1     
- Partials       61       62       +1     
Impacted Files Coverage Δ
custom_components/ocpp/api.py 83.76% <54.54%> (-0.24%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1f71c1...2d0b95c. Read the comment docs.

@drc38 drc38 requested a review from lbbrhzn February 13, 2022 03:28
@@ -268,6 +268,8 @@ async def test_services(hass, socket_enabled):
# use same id to ensure metrics populated
cp = ChargePoint("CP_1_test", ws)
cp.accept = False
cs.charge_points[cs.cpid].received_boot_notification = False
cs.charge_points[cs.cpid].post_connect_success = False
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@lbbrhzn, not sure why these statements do not fully test the if statements above, any ideas?

Copy link
Owner

@lbbrhzn lbbrhzn Feb 13, 2022

Choose a reason for hiding this comment

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

Looks like the NotImplementedError is never thrown. Are you expecting that when not accepted?
The ifs are not fully covered because the first if is always true (smart profile) and the second if is always false.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure how the NotImplementedError should work, there is also the exceptions.py code which is not called during testing but references throwing an error configuring the charger.

@lbbrhzn lbbrhzn merged commit 2cbcfb5 into main Feb 13, 2022
@lbbrhzn lbbrhzn deleted the drc38-patch-22 branch February 13, 2022 15:50
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