# HG changeset patch # User Sverre Rabbelier # Date 1239362835 0 # Node ID 573301607587f66d5c8c8400c5a98219ac3b8d85 # Parent c45f18080cc75ca201ff4d96f524cec69580fefc Add a test case to demonstrate a bug in the allocator Patch by: Sverre Rabbelier diff -r c45f18080cc7 -r 573301607587 tests/app/soc/logic/test_allocations.py --- a/tests/app/soc/logic/test_allocations.py Thu Apr 09 22:37:29 2009 +0000 +++ b/tests/app/soc/logic/test_allocations.py Fri Apr 10 11:27:15 2009 +0000 @@ -142,3 +142,18 @@ actual = result['git'] self.failUnlessEqual(expected, actual) + + def testAllOrgsLocked(self): + """Test that when all orgs are locked the correct result is given. + """ + + locked_slots = { + 'asf': 20, + 'gcc': 15, + 'git': 6, + 'google': 3, + 'melange': 3, + } + + result = self.allocater.allocate(locked_slots) + self.failUnlessEqual(locked_slots, result)