Permalink
Browse files

fix test to generate a correct range of random ints

  • Loading branch information...
1 parent 4adc88b commit 57fe43e78a4f92a45cdcbfdeb2af5a1fb41d4797 @michaelplaing michaelplaing committed Jun 13, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 tests/unit/connection_tests.py
@@ -111,7 +111,7 @@ def test_next_channel_number_returns_lowest_unused(self):
"""_next_channel_number must return lowest available channel number"""
for channel_num in xrange(1, 50):
self.connection._channels[channel_num] = True
- expectation = random.randint(5, 50)
+ expectation = random.randint(5, 49)
del self.connection._channels[expectation]
self.assertEqual(self.connection._next_channel_number(),
expectation)

0 comments on commit 57fe43e

Please sign in to comment.