Mechanical: ruff format, and ruff check --fix with the rule set every NAPALM driver uses (E, F, I, UP, B at line length 100, Python 3.10). What ruff cannot fix comes in the next commit.
17 lines
496 B
Python
17 lines
496 B
Python
"""A method exists on the driver only where the phone can answer it.
|
|
|
|
The application asks ``callable(getattr(driver, name, None))``; a stub that only
|
|
raises would claim a capability the phone does not have.
|
|
"""
|
|
|
|
import pytest
|
|
|
|
from napalm_yealink.yealink import YealinkDriver
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"name", ["get_health_metrics", "get_ssids", "get_radio_info", "get_wireless_clients"]
|
|
)
|
|
def test_no_stub_claims_what_the_phone_cannot_do(name):
|
|
assert name not in vars(YealinkDriver)
|