Browse Source

[IMP] contract_recurring_invoicing_marker: Add more tests

pull/24/head
Pedro M. Baeza 9 years ago
parent
commit
7ba0d29e02
  1. 18
      contract_recurring_invoicing_marker/tests/test_contract_recurring_invoicing_marker.py

18
contract_recurring_invoicing_marker/tests/test_contract_recurring_invoicing_marker.py

@ -31,9 +31,25 @@ class TestContractRecurringInvoicingMarker(common.TransactionCase):
'uom_id': self.uom.id})], 'uom_id': self.uom.id})],
}) })
def test_invoice_with_marker(self):
def test_monthly_invoice_with_marker(self):
self.contract.recurring_create_invoice() self.contract.recurring_create_invoice()
invoice = self.env['account.invoice'].search( invoice = self.env['account.invoice'].search(
[('partner_id', '=', self.partner.id)]) [('partner_id', '=', self.partner.id)])
self.assertEqual( self.assertEqual(
invoice.invoice_line[0].name, u'01/01/2016 - 01/31/2016') invoice.invoice_line[0].name, u'01/01/2016 - 01/31/2016')
def test_daily_invoice_with_marker(self):
self.contract.recurring_rule_type = 'daily'
self.contract.recurring_create_invoice()
invoice = self.env['account.invoice'].search(
[('partner_id', '=', self.partner.id)])
self.assertEqual(
invoice.invoice_line[0].name, u'01/01/2016 - 01/01/2016')
def test_weekly_invoice_with_marker(self):
self.contract.recurring_rule_type = 'weekly'
self.contract.recurring_create_invoice()
invoice = self.env['account.invoice'].search(
[('partner_id', '=', self.partner.id)])
self.assertEqual(
invoice.invoice_line[0].name, u'01/01/2016 - 01/07/2016')
Loading…
Cancel
Save