def test_selection_format(self):
        dialog = PartitionEditDialog(self.parent_window, self.edited_device, self.resize_info, self.supported_fs, [], True)

        # select the format_check
        dialog.format_check.set_active(True)
        dialog.fslabel_entry.set_text("Label")

        selection = dialog.get_selection()

        # check the results -- device should be resized without formatting and mountpoint
        self.assertEqual(selection.edit_device, self.edited_device)
        self.assertFalse(selection.resize)
        self.assertTrue(selection.fmt)
        self.assertIsNotNone(selection.filesystem)
        self.assertEqual(selection.label, "Label")
    def test_selection_resize(self):
        dialog = PartitionEditDialog(self.parent_window, self.edited_device, self.resize_info, self.supported_fs, [], True)

        # select new size
        size_area = dialog.widgets_dict["size"][0]
        size_area._scale.set_value(size_area._scale.get_value() // 2)

        # select new mountpoint
        dialog.mountpoint_entry.get_buffer().set_text("/home", len("/home"))

        selection = dialog.get_selection()

        # check the results -- device should be resized without formatting and mountpoint
        self.assertEqual(selection.edit_device, self.edited_device)
        self.assertTrue(selection.resize)
        self.assertFalse(selection.fmt)
        self.assertIsNone(selection.filesystem)
        self.assertEqual(selection.mountpoint, "/home")