def test_describe_without_ipaddress_raises_exception(monkeypatch): hostname = "testhost" ipaddress = None Scenario().add_host(hostname).apply(monkeypatch) source = SNMPDataSource(hostname, ipaddress) # TODO: This does not seem to be the expected exception. with pytest.raises(NotImplementedError): source.describe()
def test_describe_with_ipaddress(monkeypatch): hostname = "testhost" ipaddress = "127.0.0.1" Scenario().add_host(hostname).apply(monkeypatch) source = SNMPDataSource(hostname, ipaddress) default = "SNMP (Community: 'public', Bulk walk: no, Port: 161, Inline: no)" assert source.describe() == default