Skip to content

Commit

Permalink
!fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronHForgeFlow committed Jul 10, 2018
1 parent 84a0efe commit 3d5791e
Showing 1 changed file with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,26 @@ def test_number_of_groups(self):
procurements = self.env['procurement.order'].search([
('group_id', '=', group.id)])
self.assertEqual(len(procurements), 2)
self.assertEqual(len(groups), 2)
self.assertEqual(len(groups), 1)

req_date2 = fields.Date.to_string(self.dt2)
g_name = self.sale1.name + '/' + req_date2
groups = self.env['procurement.group'].search([('name', '=', g_name)])

for group in groups:
if group.name == g_name:
procurements = self.env['procurement.order'].search([
('group_id', '=', group.id)])
self.assertEqual(len(procurements), 2)
self.assertEqual(len(groups), 1)

self.sale2.action_confirm()
req_date = fields.Date.to_string(self.dt2)
g_name = self.sale2.name + '/' + req_date
groups = self.env['procurement.group'].search([('name', '=', g_name)])

for group in groups:
if group.name == g_name:
procurements = self.env['procurement.order'].search([
('group_id', '=', group.id)])
self.assertEqual(len(procurements), 1)
self.assertEqual(len(procurements), 4)
self.assertEqual(len(groups), 1)
g_name = self.sale2.name + '/' + self.wh1.name + '/'
groups = self.env['procurement.group'].search([('name', 'ilike',
g_name)])
self.assertEqual(len(groups), 2)

0 comments on commit 3d5791e

Please sign in to comment.