[FIX]GOLEM Resource Pack : tests adaptations and fixes after refactoring

This commit is contained in:
Fabien BOURGEOIS 2018-04-17 08:47:44 +02:00
parent b855e1436e
commit 6ccf24e485
3 changed files with 3 additions and 1 deletions

View File

@ -69,6 +69,7 @@ class TestGolemResourcePack(TransactionCase):
})
self.pack_obj = self.env['golem.resource.pack']
self.pack_data = {
'name': 'Pack Test',
'partner_id': self.partner.id
}

View File

@ -47,7 +47,7 @@ class GolemResourcePack(models.Model):
if pack.state != 'validated':
raise ValidationError(_('The current pack is not validated, please validate '
'it before creating invoice'))
elif not pack.is_products_set:
elif not pack.are_products_set:
raise ValidationError(_('You can not create an invoice for a pack without '
'linked product on every resource reserved.'))
elif pack.invoice_id.id:

View File

@ -80,6 +80,7 @@ class TestGolemResourcePack(TransactionCase):
#set pack env
self.pack_obj = self.env['golem.resource.pack']
self.pack_data = {
'name': 'Pack test',
'partner_id': self.partner_1.id,
'reservation_ids': [(4, self.reservation_1.id, 0),
(4, self.reservation_2.id, 0)]}