placement/placement/tests/unit/objects
Eric Fried 907a2cbecd Refactor: separate limiting GET /a_c results
This patch reduces the complexity of
AllocationCandidates._get_by_requests by factoring out the piece that
applies a limit to the results.

In the process of inspecting this code, I noticed what I thought was a
bug, so I wrote a test to uncover it. Turns out there was no bug; but I
kept the test case (and the "fix" for the bug - a slight refactor and
optimization of the limiting algorithm) because it provides
heretofore-absent coverage. (Since allocation requests are returned in
nondeterministic order, it would be nearly impossible to write a
functional test to ensure that the provider summaries are always trimmed
correctly.)

Change-Id: I80f8b1a74b8afdabbb85afc6caef1abef8ac3751
2018-09-14 16:15:54 -06:00
..
__init__.py Move the unit tests 2018-09-04 10:31:24 -05:00
test_resource_provider.py Refactor: separate limiting GET /a_c results 2018-09-14 16:15:54 -06:00