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

Add function for fetching ICE servers from service handlers #717

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

klejejs
Copy link
Contributor

@klejejs klejejs commented Oct 14, 2024

No description provided.

hass_nabucasa/ice_servers.py Outdated Show resolved Hide resolved
hass_nabucasa/ice_servers.py Outdated Show resolved Hide resolved
hass_nabucasa/ice_servers.py Outdated Show resolved Hide resolved
hass_nabucasa/ice_servers.py Outdated Show resolved Hide resolved
hass_nabucasa/ice_servers.py Outdated Show resolved Hide resolved
@MartinHjelmare
Copy link
Contributor

MartinHjelmare commented Oct 22, 2024

Look at existing tests for how to write tests.

@klejejs klejejs marked this pull request as ready for review October 24, 2024 10:54
async def register_ice_servers(ice_servers: list[RTCIceServer]):
nonlocal times_register_called_successfully

# There asserts will silently fail and variable will not be incremented
Copy link
Contributor

Choose a reason for hiding this comment

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

Why will they silently fail? Typo for there -> these.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As this is a callback, the test runner does not detect it failing in error logs; it just stops the further execution of the test. This could be due to try/catch in the code.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, that's just normal test behavior when using assert. I'd not add a comment about that. It's confusing to me.

tests/test_ice_servers.py Outdated Show resolved Hide resolved
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