def test_get_host_effective_attributes(web): try: web.add_host("test-host", attributes={ "ipaddress": "127.0.0.1", }) host = web.get_host("test-host", effective_attributes=False) assert "tag_networking" not in host["attributes"] host = web.get_host("test-host", effective_attributes=True) assert "tag_networking" in host["attributes"] assert host["attributes"]["tag_networking"] == "lan" finally: web.delete_host("test-host")
def test_get_host_effective_attributes(web): # noqa: F811 # pylint: disable=redefined-outer-name try: web.add_host("test-host", attributes={ "ipaddress": "127.0.0.1", }) host = web.get_host("test-host", effective_attributes=False) assert "tag_networking" not in host["attributes"] host = web.get_host("test-host", effective_attributes=True) assert "tag_networking" in host["attributes"] assert host["attributes"]["tag_networking"] == "lan" finally: web.delete_host("test-host")