'Leaves with a resource_id apply only to that resource'

def test_personal_leaves(self):

    r1 = self.env['resource.resource'].create({'name': 'Resource    1', 'calendar_id': self._calendar.id})
    r2 = self.env['resource.resource'].create({'name': 'Resource    2', 'calendar_id': self._calendar.id})
    self.env['resource.calendar.leaves'].create({'calendar_id': self._calendar.id, 'date_from': '1932-11-09    00:00:00', 'date_to': '1932-11-12    23:59:59', 'resource_id': r2.id})
    weekdays = [d for d in self._days if (d.weekday() not in (5, 6))]
    self.assertEqual(weekdays, list(r1._iter_work_days(WAR_START, WAR_END)))
    self.assertEqual([d for d in weekdays if ((d < date(1932, 11, 9)) or (d > date(1932, 11, 12)))], list(r2._iter_work_days(WAR_START, WAR_END)))
