You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
308 B
Python
13 lines
308 B
Python
7 years ago
|
|
||
|
import unittest
|
||
|
|
||
|
import testlib
|
||
|
import id_allocation
|
||
|
|
||
|
|
||
|
class SlaveTest(testlib.RouterMixin, unittest.TestCase):
|
||
|
def test_slave_allocates_id(self):
|
||
|
context = self.router.local()
|
||
|
id_ = context.call(id_allocation.allocate_an_id)
|
||
|
assert id_ == (self.router.id_allocator.next_id - 1)
|