CI / test (3.10) (push) Successful in 29s
CI / test (3.11) (push) Successful in 26s
CI / test (3.12) (push) Successful in 28s
CI / test (3.10) (pull_request) Successful in 30s
CI / test (3.11) (pull_request) Successful in 28s
CI / test (3.12) (pull_request) Successful in 29s
get_health_metrics, get_ssids, get_radio_info and get_wireless_clients only raised NotImplementedError. They are left over from when the driver sat on AccessPointDriver, and a stub makes a capability check (callable(getattr(driver, name))) answer yes. The application polls SNMP itself (napalm-device-types docs/STRUCTURE.md); a phone has no profile to declare. Also stops tracking the .pyc and egg-info files .gitignore already lists. Closes #2
15 lines
490 B
Python
15 lines
490 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)
|