def test_get_aps(): app_mock = mock.MagicMock() ieee = t.EmberEUI64(map(t.uint8_t, [0, 1, 2, 3, 4, 5, 6, 7])) dev = device.Device(app_mock, ieee, 65535) ep = endpoint.Endpoint(dev, 55) ep.status = endpoint.Status.INITIALIZED ep.profile_id = 99 aps = ep.get_aps(255) assert aps.profileId == 99 assert aps.clusterId == 255 assert aps.sourceEndpoint == 55 assert aps.destinationEndpoint == 55
def add_endpoint(self, endpoint_id): ep = endpoint.Endpoint(self, endpoint_id) self.endpoints[endpoint_id] = ep return ep
def ep(): dev = mock.MagicMock() return endpoint.Endpoint(dev, 1)