Esempio n. 1
0
    def test_sequential_assignment_full_pool(self):
        four_pool = IPNetwork("192.168.0.0/30")
        assigner = SequentialAssignment()

        assert_equal("192.168.0.1", assigner.allocate(four_pool))
        assert_equal("192.168.0.2", assigner.allocate(four_pool))
        assert_equal(None, assigner.allocate(four_pool))
Esempio n. 2
0
 def test_sequential_assignment_tiny_pool(self):
     assigner = SequentialAssignment()
     assert_equal(None, assigner.allocate(IPNetwork("192.168.0.0/31")))
Esempio n. 3
0
 def test_sequential_assignment(self):
     assigner = SequentialAssignment()
     assert_equal("192.168.0.1", assigner.allocate(pool))