[client] Relocate misplaced methods: get_device_kinds, get_measure_keys, get_authenticated_user #177
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Executes the method-relocation part of the #151 audit. Moving methods between private mixins is free — resolution happens on the composed
ComwattClientinstance, so the public API and existing tests are unaffected.Moves:
get_device_kinds(site_uid)(_devices.py:107, GET/devicekinds/by-site-uid/) is a catalogue read →CataloguesMixin(_catalogues.py, which already holdsget_products/get_timezones/get_modbus_configurations).get_measure_keys(site_id)(_connected_objects.py:82, GET/measurekeys/...?siteId=) is a site-scoped lookup, not a connected-object subresource →SitesMixin.get_authenticated_user()(_sites.py:24, GET/users/authenticated) belongs next tois_authenticated, which already probes the same URL (_auth.py:79) →AuthMixin.Kept in place (defensible):
get_modbus_configurationsstays in catalogues despite the/gateways/path;get_electricity_contract_providersstays in electricity-contracts.Done when: three methods moved,
pytest -qgreen, no README/signature change.