Ejemplo n.º 1
0
def send(data, resp_json, status=200, logger=None):
    handler = get_handler('smstraffic')
    responses.add(responses.POST, handler.base_url,
                  body=json.dumps(resp_json), status=status)
    if logger is None:
        logger = Mock()
    handler.send(data, logger=logger)
    return logger
Ejemplo n.º 2
0
def use_db_logger():
    handler = get_handler('smstraffic')
    handler.send({'user': '******'}, db_logger)