コード例 #1
0
ファイル: test_milestones.py プロジェクト: tyler46/affiliates
 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))
コード例 #2
0
ファイル: test_milestones.py プロジェクト: tyler46/affiliates
 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))
コード例 #3
0
 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))
コード例 #4
0
 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))
コード例 #5
0
 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))
コード例 #6
0
 def test_surrounding_milestones(self):
     eq_(MilestoneDisplay.surrounding_milestones(5, [1, 3, 4, 6, 7]), (4, 6))
コード例 #7
0
ファイル: test_milestones.py プロジェクト: tyler46/affiliates
 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))
コード例 #8
0
ファイル: test_milestones.py プロジェクト: tyler46/affiliates
 def test_surrounding_milestones(self):
     eq_(MilestoneDisplay.surrounding_milestones(5, [1, 3, 4, 6, 7]),
         (4, 6))