示例#1
0
    def test_create_live_os_source(self, publisher):
        """Test creation of the Live OS source module."""
        source_path = self.payload_interface.CreateSource(
            SOURCE_TYPE_LIVE_OS_IMAGE)

        check_dbus_object_creation(self, source_path, publisher,
                                   LiveOSSourceModule)
示例#2
0
    def test_device_tree(self, publisher):
        """Test the device tree."""
        self.module.on_storage_changed(Mock())
        path = self.interface.GetDeviceTree()
        obj = check_dbus_object_creation(path, publisher,
                                         ResizableDeviceTreeModule)
        assert obj.implementation.storage == self.module.storage

        self.module.on_partitioning_reset()
        assert obj.implementation.storage == self.module.storage

        self.module.on_storage_changed(Mock())
        assert obj.implementation.storage == self.module.storage
示例#3
0
 def test_device_tree(self, publisher):
     """Test the device tree."""
     self.module.on_storage_changed(create_storage())
     path = self.interface.GetDeviceTree()
     check_dbus_object_creation(path, publisher, DeviceTreeSchedulerModule)