Example #1
0
 def test_remove_items_with_delete(self):
     self.io.addinput('y')
     commands.remove_items(self.lib, '', False, True)
     items = self.lib.items()
     self.assertEqual(len(list(items)), 0)
     self.assertFalse(os.path.exists(self.i.path))
Example #2
0
 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))
Example #3
0
 def test_remove_items_with_delete(self):
     self.io.addinput('y')
     commands.remove_items(self.lib, u'', False, True)
     items = self.lib.items()
     self.assertEqual(len(list(items)), 0)
     self.assertFalse(os.path.exists(self.i.path))
Example #4
0
 def test_remove_items_no_delete(self):
     self.io.addinput("y")
     commands.remove_items(self.lib, "", False, False)
     items = self.lib.items()
     self.assertEqual(len(list(items)), 0)
     self.assertTrue(os.path.exists(self.i.path))
Example #5
0
 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))