def test_compute_date_labels(self): gantt = Gantt(util.nov1, [], util.nov23) self.assertEqual([ {'label': 'Nov 05, 2012', 'x': 220}, {'label': 'Nov 12, 2012', 'x': 430}, {'label': 'Nov 19, 2012', 'x': 640}], gantt.date_labels()) return
def as_json(self): # Set the end date of the chart to be 3 weeks out max_date = self.cur_day + timedelta(21) gantt = Gantt(self.cur_day, self.data, max_date) return gantt.as_json()
def test_compute_dates(self): gantt = Gantt(util.nov1, [], util.nov23) self.assertEqual([util.nov5, util.nov12, util.nov19], gantt.tick_dates) return
def as_json(self): max_date = self.cur_day + timedelta(21) gantt = Gantt(self.cur_day, self.data, max_date) return gantt.as_json()