def test_callback(self): def cb(status): print(status) def cb2(status): raise IndexError t_config = TConfig() t_config.PUBLIC_KEY = '25RSdhJ+xCsxxTjY5jffilatipp29tnKp/D5BelSMJM' t_config.DATA_DIR = os.getcwd() client = Client(t_config, refresh=True, test=True, call_back=cb, callbacks=[cb, cb2]) client.add_call_back(cb2) assert client.update_check(client.app_name, '0.0.0') is None
def test_callback(self): def cb(status): print(status) def cb2(status): raise IndexError t_config = TConfig() t_config.PUBLIC_KEYS = ['bad key'] t_config.DATA_DIR = os.getcwd() client = Client(t_config, refresh=True, test=True, call_back=cb, callbacks=[cb, cb2]) client.add_call_back(cb2) assert client.update_check('jms', '0.0.0') is None