def test_duty_rota_recurring(self): events = get_events() events.sort(key=lambda ev: ev['start']) curr_summ = events[0]['summary'] self.assertTrue(curr_summ == 'foo' or curr_summ == 'bar') for i in range(0, 60): self.assertEqual(events[i]['summary'], curr_summ) if(curr_summ == 'foo'): curr_summ = 'bar' else: curr_summ = 'foo'
def test_duty_rota(self): events = get_events() self.assertEqual(events[0]['summary'], 'troels')
def test_duty_rota_recurring_complex(self): events = get_events() events.sort(key=lambda ev: ev['start']) curr_summ = events[0]['summary'] self.assertTrue(curr_summ == 'foo' or curr_summ == 'bar')