def test_get_extra_costs_monthly_cost(self): self.assertEqual( self.venture.id, ExtraCostPlugin.get_extra_costs_monthly_cost( self.start, self.end, [self.venture], )[0][0]['pricing_venture']) self.assertEqual( self.type, ExtraCostPlugin.get_extra_costs_monthly_cost( self.start, self.end, [self.venture], )[0][0]['type']) self.assertEqual( self.value, ExtraCostPlugin.get_extra_costs_monthly_cost( self.start, self.end, [self.venture], )[0][0]['total_cost']) self.assertEqual( self.value, ExtraCostPlugin.get_extra_costs_monthly_cost( self.start, self.end, [self.venture], )[1])
def test_get_extra_costs_monthly_cost(self): self.assertEqual( self.venture.id, ExtraCostPlugin.get_extra_costs_monthly_cost( self.start, self.end, [self.venture], )[0][0]['pricing_venture'] ) self.assertEqual( self.type, ExtraCostPlugin.get_extra_costs_monthly_cost( self.start, self.end, [self.venture], )[0][0]['type'] ) self.assertEqual( self.value, ExtraCostPlugin.get_extra_costs_monthly_cost( self.start, self.end, [self.venture], )[0][0]['total_cost'] ) self.assertEqual( self.value, ExtraCostPlugin.get_extra_costs_monthly_cost( self.start, self.end, [self.venture], )[1] )
def test_schema(self): self.assertEqual( True, ExtraCostPlugin.schema()['extra_cost_{}'.format( self.type.id)]['currency']) self.assertEqual( self.type.name, ExtraCostPlugin.schema()['extra_cost_{}'.format( self.type.id)]['name']) self.assertEqual( True, ExtraCostPlugin.schema()['extra_costs_total']['total_cost']) self.assertEqual('Extra Costs Total', ExtraCostPlugin.schema()['extra_costs_total']['name'])
def test_costs(self): self.assertEqual( self.value, ExtraCostPlugin.costs( self.start, self.end, [self.venture], )[1]['extra_cost_{}'.format(self.type.id)]) self.assertEqual( self.value * 2, ExtraCostPlugin.costs( self.start, self.end, [self.venture], )[1]['extra_costs_total'])
def test_get_extra_costs(self): self.assertEqual( self.venture, ExtraCostPlugin.get_extra_costs( self.start, self.end, [self.venture], )[0].pricing_venture) self.assertEqual( self.type, ExtraCostPlugin.get_extra_costs( self.start, self.end, [self.venture], )[0].type)
def test_costs(self): self.assertEqual( self.value, ExtraCostPlugin.costs( self.start, self.end, [self.venture], )[1]['extra_cost_{}'.format(self.type.id)] ) self.assertEqual( self.value, ExtraCostPlugin.costs( self.start, self.end, [self.venture], )[1]['extra_costs_total'] )
def test_get_extra_costs(self): self.assertEqual( self.venture, ExtraCostPlugin.get_extra_costs( self.start, self.end, [self.venture], )[0].pricing_venture ) self.assertEqual( self.type, ExtraCostPlugin.get_extra_costs( self.start, self.end, [self.venture], )[0].type )
def test_total_cost(self): self.assertEqual( self.value, ExtraCostPlugin.total_cost( self.start, self.end, [self.venture] ) )
def test_schema(self): self.assertEqual( True, ExtraCostPlugin.schema()[ 'extra_cost_{}'.format(self.type.id) ]['currency'] ) self.assertEqual( self.type.name, ExtraCostPlugin.schema()[ 'extra_cost_{}'.format(self.type.id) ]['name'] ) self.assertEqual( True, ExtraCostPlugin.schema()['extra_costs_total']['total_cost'] ) self.assertEqual( 'Extra Costs Total', ExtraCostPlugin.schema()['extra_costs_total']['name'] )
def test_total_cost(self): self.assertEqual( self.value * 2, ExtraCostPlugin.total_cost(self.start, self.end, [self.venture]))