def test_appendice_proxy_LEONEXTERMINATE(monkeypatch):

    FakeZmq.recv_msgs[0] = ['LEONEXTERMINATE_42']
    
    appendice_proxy = AppendiceProxy()
    appendice_proxy.run(False)
    
    assert FakeZmq.sent_msgs[2][0] == {'job_id': 42, 'args': [], 'cmd': 'LEONEXTERMINATE'}
def test_appendice_proxy_OAREXEC(monkeypatch):

    FakeZmq.recv_msgs[0] = ['OAREXEC_10_2_N_34']
    
    appendice_proxy = AppendiceProxy()
    appendice_proxy.run(False)
    
    assert FakeZmq.sent_msgs[2][0] == {'job_id': 10, 'args': ['2', 'N', '34'], 'cmd': 'OAREXEC'}
def test_appendice_proxy_OARRUNJOB(monkeypatch):

    FakeZmq.recv_msgs[0] = ['OARRUNJOB_42']
    
    appendice_proxy = AppendiceProxy()
    appendice_proxy.run(False)
    
    assert FakeZmq.sent_msgs[2][0] == {'job_id': 42, 'args': [], 'cmd': 'OARRUNJOB'}
def test_appendice_proxy_simple(monkeypatch):

    FakeZmq.recv_msgs[0] = ['yop']

    appendice_proxy =  AppendiceProxy()
    appendice_proxy.run(False)
    
    assert FakeZmq.sent_msgs[1][0] == {'cmd': 'yop'}