Exemplo n.º 1
0
    def test_find_devices(self):
        storage = Mock()

        task = FindDevicesTask(storage.devicetree)
        task.run()

        storage.devicetree.populate.assert_called_once_with()
Exemplo n.º 2
0
    def find_devices_with_task(self):
        """Find new devices.

        The task will populate the device tree with new devices.

        :return: a task
        """
        return FindDevicesTask(self.storage.devicetree)
Exemplo n.º 3
0
    def find_devices_with_task(self):
        """Find new devices.

        The task will populate the device tree with new devices.

        :return: a path to the task
        """
        task = FindDevicesTask(self.storage.devicetree)
        path = self.publish_task(DEVICE_TREE_HANDLER.namespace, task)
        return path