From 3f8a85c82544c998bdc9dc9cb08ec4afde3f3961 Mon Sep 17 00:00:00 2001 From: Jack Wilsdon Date: Wed, 8 Jun 2016 19:26:42 +0100 Subject: [PATCH] Add tests for force deletion (without input) --- test/test_ui.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test_ui.py b/test/test_ui.py index f91fe2798..d40bfe3b7 100644 --- a/test/test_ui.py +++ b/test/test_ui.py @@ -146,6 +146,18 @@ class RemoveTest(_common.TestCase): self.assertEqual(len(list(items)), 0) self.assertFalse(os.path.exists(self.i.path)) + def test_remove_items_with_force_no_delete(self): + commands.remove_items(self.lib, u'', False, False, True) + items = self.lib.items() + self.assertEqual(len(list(items)), 0) + self.assertTrue(os.path.exists(self.i.path)) + + def test_remove_items_with_force_delete(self): + commands.remove_items(self.lib, u'', False, True, True) + items = self.lib.items() + self.assertEqual(len(list(items)), 0) + self.assertFalse(os.path.exists(self.i.path)) + class ModifyTest(unittest.TestCase, TestHelper):