Test for get_whitelist_paths() / set_whitelist_paths()
(self)
| 134 | self.assertFalse(o.get_tree("parent", "child")) |
| 135 | |
| 136 | def test_keep_list(self): |
| 137 | """Test for get_whitelist_paths() / set_whitelist_paths()""" |
| 138 | o = bleachbit.Options.options |
| 139 | # FIXME: finish renaming whitelist to keep list |
| 140 | self.assertIsInstance(o.get_whitelist_paths(), list) |
| 141 | keep_list = [('file', '/home/foo'), ('folder', '/home'), |
| 142 | ('file', '/home/unicode/кодирование')] |
| 143 | old_keep_list = o.get_whitelist_paths() |
| 144 | o.config.remove_section('whitelist/paths') |
| 145 | self.assertIsInstance(o.get_whitelist_paths(), list) |
| 146 | self.assertEqual(o.get_whitelist_paths(), []) |
| 147 | o.set_whitelist_paths(keep_list) |
| 148 | self.assertIsInstance(o.get_whitelist_paths(), list) |
| 149 | self.assertEqual(set(keep_list), set(o.get_whitelist_paths())) |
| 150 | o.set_whitelist_paths(old_keep_list) |
| 151 | o.close() |
| 152 | self.assertEqual(set(old_keep_list), set(o.get_whitelist_paths())) |
| 153 | |
| 154 | def test_init_configuration(self): |
| 155 | """Test for init_configuration()""" |
nothing calls this directly
no test coverage detected