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