Exemple #1
0
 def override(self, service_patcher, config_patcher):
     config_patcher(1, 'ws.call_timeout')
     service_patcher('test', self)
Exemple #2
0
def test_call_timeout(ws, config_patcher, monkeypatch):
    monkeypatch.setattr(stopped, 'is_set', Mock(return_value=False))
    config_patcher(1, 'ws.call_timeout')
    pytest.raises(Exception, ws.call, 'foo.bar')
    assert 'xxx' not in ws._callbacks
    assert 9 <= stopped.is_set.call_count <= 11
Exemple #3
0
def test_call_timeout(ws, config_patcher, monkeypatch):
    monkeypatch.setattr(stopped, 'is_set', Mock(return_value=False))
    config_patcher(1, 'ws.call_timeout')
    pytest.raises(Exception, ws.call, 'foo.bar')
    assert 'xxx' not in ws._callbacks
    assert 9 <= stopped.is_set.call_count <= 11
Exemple #4
0
 def override(self, service_patcher, config_patcher):
     config_patcher(1, 'ws.call_timeout')
     service_patcher('test', self)
Exemple #5
0
def test_call_timeout(ws, config_patcher, monkeypatch):
    monkeypatch.setattr(stopped, 'wait', Mock())
    config_patcher(1, 'ws.call_timeout')
    pytest.raises(Exception, ws.call, 'foo.bar')
    assert 'xxx' not in ws._callbacks
    assert stopped.wait.call_count == 10
def test_call_timeout(ws, config_patcher, monkeypatch):
    monkeypatch.setattr(stopped, 'wait', Mock())
    config_patcher(1, 'ws.call_timeout')
    pytest.raises(Exception, ws.call, 'foo.bar')
    assert 'xxx' not in ws._callbacks
    assert stopped.wait.call_count == 10