Scrub real LAN addresses, MACs and name from docs and test fixtures
This commit is contained in:
parent
c9738358de
commit
3d0e4bd153
6 changed files with 20 additions and 20 deletions
|
|
@ -57,7 +57,7 @@ def handler(request: httpx.Request) -> httpx.Response:
|
|||
})
|
||||
if p == "/control/clients":
|
||||
return httpx.Response(200, json={
|
||||
"clients": [{"name": "Neil's laptop", "ids": ["192.168.1.5", "AA:BB:CC:DD:EE:01"]}],
|
||||
"clients": [{"name": "Test laptop", "ids": ["192.168.1.5", "AA:BB:CC:DD:EE:01"]}],
|
||||
"auto_clients": [{"ip": "192.168.1.50", "name": "tv.lan", "source": "rDNS"}],
|
||||
})
|
||||
if p == "/control/dhcp/status":
|
||||
|
|
@ -90,7 +90,7 @@ def test_discovery_merges_sources(hub, ag):
|
|||
asyncio.run(dns.discover_once())
|
||||
clients = {c["key"]: c for c in hub.get("/api/clients").json()["clients"]}
|
||||
laptop = clients["aa:bb:cc:dd:ee:01"]
|
||||
assert laptop["ip"] == "192.168.1.5" and laptop["hostname"] in ("Neil's laptop", "host-5")
|
||||
assert laptop["ip"] == "192.168.1.5" and laptop["hostname"] in ("Test laptop", "host-5")
|
||||
assert laptop["online"] and laptop["queries"] == 660 and "adguard" in laptop["sources"]
|
||||
assert not laptop["new"] # found on the first day: not flagged as new
|
||||
assert clients["aa:bb:cc:dd:ee:02"]["hostname"] == "plug"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue