mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-12-21 20:20:11 +00:00
Cleanup credentials handling (#605)
* credentials: don't allow none to simplify checks * Implement __bool__ for credentials * Cleanup klaptransport cred usage * Cleanup deviceconfig and tapodevice * fix linting * Pass dummy credentials for tests * Remove __bool__ dunder and add docs to credentials * Check for cred noneness in tapodevice.update()
This commit is contained in:
@@ -305,7 +305,13 @@ class FakeSmartProtocol(SmartProtocol):
|
||||
class FakeSmartTransport(BaseTransport):
|
||||
def __init__(self, info):
|
||||
super().__init__(
|
||||
config=DeviceConfig("127.0.0.123", credentials=Credentials()),
|
||||
config=DeviceConfig(
|
||||
"127.0.0.123",
|
||||
credentials=Credentials(
|
||||
username="dummy_user",
|
||||
password="dummy_password", # noqa: S106
|
||||
),
|
||||
),
|
||||
)
|
||||
self.info = info
|
||||
|
||||
|
||||
Reference in New Issue
Block a user