Exemplo n.º 1
0
def test_start_webserver_invalid_port(monkeypatch):
    monkeypatch.setattr("chitanda.bot.config",
                        {"webserver": {
                            "enable": True,
                            "port": "123a"
                        }})
    with patch.object(Chitanda, "connect"):
        with pytest.raises(SystemExit):
            chitanda = Chitanda()
            chitanda._start_webserver()
Exemplo n.º 2
0
def test_start_webserver_invalid_port(monkeypatch):
    monkeypatch.setattr('chitanda.bot.config',
                        {'webserver': {
                            'enable': True,
                            'port': '123a'
                        }})
    with patch.object(Chitanda, 'connect'):
        with pytest.raises(SystemExit):
            chitanda = Chitanda()
            chitanda._start_webserver()