class MasterTestCase(unittest.TestCase, DBTestCaseMixin):
    def setUp(self):
        config = ConfigObj(config_path)['CORE']
        db_host = config['DATABASE']['HOST']
        db_port = config['DATABASE']['PORT']
        db_name = config['DATABASE']['DB_NAME']
        self.init_db_data(db_host, db_port, db_name)
        self.redis = redis.Redis(config['REDIS']['HOST'], int(config['REDIS']['PORT']), password=config['REDIS']['PASSWORD'])
        self.daemon_channel = config['REDIS']['DAEMON_CHANNEL']
        self.master = Master(config_path)
        self.db_wrapper = MongoDBWrapper(db_host, int(db_port), db_name)

    def tearDown(self):
        try:
            self.master.run_command('shutdown')
        except SystemExit:
            pass
        self.drop_db_data()
 def setUp(self):
     config = ConfigObj(config_path)['CORE']
     db_host = config['DATABASE']['HOST']
     db_port = config['DATABASE']['PORT']
     db_name = config['DATABASE']['DB_NAME']
     self.init_db_data(db_host, db_port, db_name)
     self.redis = redis.Redis(config['REDIS']['HOST'], int(config['REDIS']['PORT']), password=config['REDIS']['PASSWORD'])
     self.daemon_channel = config['REDIS']['DAEMON_CHANNEL']
     self.master = Master(config_path)
     self.db_wrapper = MongoDBWrapper(db_host, int(db_port), db_name)
'''
    Copyright (c) 2012 Alexander Abbott

    This file is part of the Cheshire Cyber Defense Scoring Engine (henceforth
    referred to as Cheshire).

    Cheshire 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.

    Cheshire 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 Cheshire.  If not, see <http://www.gnu.org/licenses/>.
'''
from WhiteRabbit.master import Master

if __name__ == '__main__':
    master = Master()
    master.run()