def test_update_subdirs_delete_not_present(self): """Test when we delete and is not present.""" path = '/Users/username/path/to/not/dir' test_path = self.mktemp("test_directory") watch = Watch(1, test_path, None) watch._update_subdirs(path, REVERSE_MACOS_ACTIONS[IN_DELETE]) self.assertTrue(path not in watch._subdirs)
def test_update_subdirs_create_not_present(self): """Test when we update on a create event and not present.""" path = '/Users/username/path/to/not/dir' test_path = self.mktemp("test_directory") watch = Watch(1, test_path, None) watch._update_subdirs(path, REVERSE_MACOS_ACTIONS[IN_CREATE]) self.assertTrue(path in watch._subdirs)