Permalink
Browse files

Merge pull request #480 from michaelplaing/fix-test_next_channel_numb…

…er_returns_lowest_unused

fix test to generate a correct range of random ints
  • Loading branch information...
2 parents 4adc88b + 57fe43e commit c8e80407b8a613d8e325c48a9f403ca888d902b8 @gmr gmr committed Jun 29, 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 c8e8040

Please sign in to comment.