コード例 #1
0
ファイル: test_usage_base.py プロジェクト: szok/ralph_pricing
 def test_get_total_cost_sum_whole(self):
     result = UsagePlugin.total_cost(
         start=datetime.date(2013, 10, 5),
         end=datetime.date(2013, 10, 25),
         usage_type=self.usage_type_cost_sum,
         ventures=self.ventures,
         forecast=False,
     )
     self.assertEquals(result, D('77000'))
コード例 #2
0
ファイル: test_usage_base.py プロジェクト: szok/ralph_pricing
 def test_get_total_cost_sum(self):
     result = UsagePlugin.total_cost(
         start=datetime.date(2013, 10, 10),
         end=datetime.date(2013, 10, 20),
         usage_type=self.usage_type_cost_sum,
         ventures=self.ventures_subset,
         forecast=False,
     )
     self.assertEquals(result, D('16500'))
コード例 #3
0
ファイル: test_usage_base.py プロジェクト: ar4s/ralph_pricing
 def test_get_total_cost_sum(self):
     result = UsagePlugin.total_cost(
         start=datetime.date(2013, 10, 10),
         end=datetime.date(2013, 10, 20),
         usage_type=self.usage_type_cost_sum,
         ventures=self.ventures_subset,
         forecast=False,
     )
     self.assertEquals(result, D('16500'))
コード例 #4
0
 def test_get_total_cost_sum_whole(self):
     result = UsagePlugin.total_cost(
         start=datetime.date(2013, 10, 5),
         end=datetime.date(2013, 10, 25),
         usage_type=self.usage_type_cost_sum,
         ventures=self.ventures,
         forecast=False,
     )
     self.assertEquals(result, D('77000'))
コード例 #5
0
ファイル: test_usage_base.py プロジェクト: szok/ralph_pricing
 def test_get_total_cost_sum_beyond_usageprices(self):
     # even with no_price_msg total cost should return valid cost
     result = UsagePlugin.total_cost(
         start=datetime.date(2013, 10, 1),
         end=datetime.date(2013, 10, 28),
         usage_type=self.usage_type_cost_sum,
         ventures=self.ventures,
         forecast=False,
         no_price_msg=True,
     )
     self.assertEquals(result, D('77000'))
コード例 #6
0
 def test_get_total_cost_sum_beyond_usageprices(self):
     # even with no_price_msg total cost should return valid cost
     result = UsagePlugin.total_cost(
         start=datetime.date(2013, 10, 1),
         end=datetime.date(2013, 10, 28),
         usage_type=self.usage_type_cost_sum,
         ventures=self.ventures,
         forecast=False,
         no_price_msg=True,
     )
     self.assertEquals(result, D('77000'))