class CheckManagerTest(unittest.TestCase): """ Base class for all check manager tests. """ def setUp(self): self.manager = CheckManager() def tearDown(self): self.manager.del_state()
class CheckManagerTest(TestCase): """ Base class for all check manager tests. """ def setUp(self): """ initialize a manager. """ self.manager = CheckManager(data_scope='test_check') def tearDown(self): self.manager.del_state()
# Copyright (c) 2016 "Capensis" [http://www.capensis.com] # # This file is part of Canopsis. # # Canopsis is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Canopsis is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with Canopsis. If not, see <http://www.gnu.org/licenses/>. # --------------------------------- from canopsis.common.ws import route from canopsis.check.manager import CheckManager from canopsis.webcore.services.rest import delete_records manager = CheckManager() def exports(ws): @route(ws.application.delete, name='userview', payload=[]) def remove_elements(_id, **kwargs): delete_records(ws, 'default_rights', 'action', _id, None) return delete_records(ws, 'object', 'view', _id, None)
def setUp(self): self.manager = CheckManager()
def setUp(self): """ initialize a manager. """ self.manager = CheckManager(data_scope='test_check')