You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That is interesting - and I would agree, at the point we hook into requests should be well before any DNS resolution happens.
From your snippet and tcpdump though I can't reproduce. There's a decent chance though on my current macbook with some corp settings that there might be like DNS over TLS or other new thing configured, but i do see some DNS traffic.
Can someone else confirm if they see this as well?
How to prevent calling
socket.gethostbyname
while usingrequests_mock
?I still see DNS query sent out even though I mock the url.
Haven't looked into too deep, but I thought the mock adaptor should intercept before IP address lookup?
Here is the code to reproduce
I'm using python3.11
And then use
tcpdump -i any udp port 53
(may needsudo
) to monitor DNS traffic.The text was updated successfully, but these errors were encountered: