def mockreadreturn(rack, board, device): """Mock method that will be used in monkeypatching the read command.""" r = SynseResponse() r.data = {'value': 1} return r
def mockwritereturn(rack, board, device, data): """Mock method that will be used in monkeypatching the write command.""" r = SynseResponse() r.data = {'data': data} return r
def mockreturn(rack, board, device): """Mock method that will be used in monkeypatching the command.""" r = SynseResponse() r.data = {'r': rack, 'b': board, 'd': device} return r
def _mock(*args, **kwargs): r = SynseResponse() r.data = {'value': 1} # data doesn't matter here return r
def mockreturn(): """Mock method that will be used in monkeypatching the command.""" r = SynseResponse() r.data = [] return r
def mockreturn(transaction): """Mock method that will be used in monkeypatching the command.""" r = SynseResponse() r.data = {'id': transaction} return r