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
Beispiel #4
0
 def _mock(*args, **kwargs):
     r = SynseResponse()
     r.data = {'value': 1}  # data doesn't matter here
     return r
Beispiel #5
0
def mockreturn():
    """Mock method that will be used in monkeypatching the command."""
    r = SynseResponse()
    r.data = []
    return r
Beispiel #6
0
def mockreturn(transaction):
    """Mock method that will be used in monkeypatching the command."""
    r = SynseResponse()
    r.data = {'id': transaction}
    return r