def test_surrounding_milestones_equal(self): """ If the amount is equal to one of the milestones, return that amount as the previous milestone. """ eq_(MilestoneDisplay.surrounding_milestones(5, [3, 5, 8, 10, 15]), (5, 8))
def test_surrounding_milestones_last_prev(self): """ If the amount is greater than all the milestones, return None for the next milestone. """ eq_(MilestoneDisplay.surrounding_milestones(25, [8, 10, 15]), (15, None))
def test_surrounding_milestones_equal(self): """ If the amount is equal to one of the milestones, return that amount as the previous milestone. """ eq_(MilestoneDisplay.surrounding_milestones(5, [3, 5, 8, 10, 15]), (5, 8))
def test_surrounding_milestones_last_prev(self): """ If the amount is greater than all the milestones, return None for the next milestone. """ eq_(MilestoneDisplay.surrounding_milestones(25, [8, 10, 15]), (15, None))
def test_surrounding_milestones_first_next(self): """ If the amount is smaller than all the milestones, return None for the previous milestone. """ eq_(MilestoneDisplay.surrounding_milestones(5, [8, 10, 15]), (None, 8))
def test_surrounding_milestones(self): eq_(MilestoneDisplay.surrounding_milestones(5, [1, 3, 4, 6, 7]), (4, 6))
def test_surrounding_milestones_first_next(self): """ If the amount is smaller than all the milestones, return None for the previous milestone. """ eq_(MilestoneDisplay.surrounding_milestones(5, [8, 10, 15]), (None, 8))
def test_surrounding_milestones(self): eq_(MilestoneDisplay.surrounding_milestones(5, [1, 3, 4, 6, 7]), (4, 6))