Example #1
0
        def _create_master():
            '''
            Create master instance
            :return:
            '''
            master = daemons.Master()
            master.config = {'user': '******', 'hash_type': alg}
            for attr in ['master', 'start_log_info', 'prepare']:
                setattr(master, attr, MagicMock())

            return master
Example #2
0
    def _create_master():
        """
        Create master instance
        :return:
        """
        obj = daemons.Master()
        obj.config = {"user": "******", "hash_type": alg}
        for attr in ["start_log_info", "prepare", "shutdown", "master"]:
            setattr(obj, attr, MagicMock())

        return obj
Example #3
0
    def _create_master():
        '''
        Create master instance
        :return:
        '''
        obj = daemons.Master()
        obj.config = {'user': '******', 'hash_type': alg}
        for attr in ['start_log_info', 'prepare', 'shutdown', 'master']:
            setattr(obj, attr, MagicMock())

        return obj