Skip to content

Commit ff86d33

Browse files
Merge pull request #3 from Guardis-AI/pre-ipv6-fix-pytest
Fix pytest. Use socket rather than IO.TextWrapper object to correctly apply the monkeypatch.
2 parents 9ef49ac + dc786e4 commit ff86d33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_probing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def mock_select(*args):
2424
"set a mock Probe response event in motion for the same socket"
2525
global sck
2626
if sck and sck.getsockname()[1] == MULTICAST_PORT:
27-
key = selectors.SelectorKey(sck.makefile(), sck.fileno(), [], "")
27+
key = selectors.SelectorKey(sck, sck.fileno(), [], "")
2828
# to mock just one response we just nullify the sock
2929
sck = None
3030
return [(key, selectors.EVENT_READ)]

0 commit comments

Comments
 (0)