Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
btimby committed May 17, 2017
1 parent 60365fb commit bce319b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion radius.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def authenticate(self, username, password, **kwargs):

r, w, x = select([c], [], [], self.timeout)
if c in r:
recv = c.recv(4096)
recv = c.recv(PACKET_MAX)
else:
# No data available on our socket. Try again.
LOGGER.warning('Timeout expired on try %s', i)
Expand Down
4 changes: 2 additions & 2 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def test_success(self):
"""Test sending a message and receiving an accept reply."""
def _reply_to_client():
"""Thread to act as server."""
data, addr = self.sock.recvfrom(4096)
data, addr = self.sock.recvfrom(radius.PACKET_MAX)
m1 = radius.Message.unpack(TEST_SECRET, data)
m2 = create_reply(m1, radius.CODE_ACCESS_ACCEPT)
self.sock.sendto(m2.pack(), addr)
Expand All @@ -193,7 +193,7 @@ def test_challenge(self):
"""Test sending a message and receiving an challenge reply."""
def _reply_to_client():
"""Thread to act as server."""
data, addr = self.sock.recvfrom(4096)
data, addr = self.sock.recvfrom(radius.PACKET_MAX)
m1 = radius.Message.unpack(TEST_SECRET, data)
m2 = create_reply(m1, radius.CODE_ACCESS_CHALLENGE, attributes={
'Reply-Message': 'Message one',
Expand Down

0 comments on commit bce319b

Please sign in to comment.