Add tests for force deletion (without input)

This commit is contained in:
Jack Wilsdon 2016-06-08 19:26:42 +01:00
parent 0d2923e4ea
commit 3f8a85c825

View file

@ -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):