class CategoryTestCase(TestCase): def setUp(self): self.alice = User(username='******') self.alice.save() self.calendar = GCalendar(user=self.alice) self.calendar.save() def test_separation_of_categories(self): # TODO print "SKIPPING CATEGORY TESTS" return now = datetime.datetime.now() yesterday = now - datetime.timedelta(days=1) e1 = GEvent(name='bigger', start=yesterday, end=yesterday+datetime.timedelta(hours=1), calendar=self.calendar, color=GEvent.EVENT_COLORS[0]) e1.save() e2 = GEvent(name='bigger smaller', start_time=yesterday, end_time=yesterday+datetime.timedelta(hours=1), calendar=self.calendar, color=GEvent.EVENT_COLORS[0],) e2.save() stat1 = Statistic(user=self.alice, name='Bigger', start_time=yesterday, end_time=now,) stat1.save() self.assertEqual(2, stat1.query().count())
class CategoryTestCase(TestCase): def setUp(self): self.alice = User(username='******') self.alice.save() self.calendar = GCalendar(user=self.alice) self.calendar.save() def test_separation_of_categories(self): # TODO print "SKIPPING CATEGORY TESTS" return now = datetime.datetime.now() yesterday = now - datetime.timedelta(days=1) e1 = GEvent(name='bigger', start=yesterday, end=yesterday + datetime.timedelta(hours=1), calendar=self.calendar, color=GEvent.EVENT_COLORS[0]) e1.save() e2 = GEvent( name='bigger smaller', start_time=yesterday, end_time=yesterday + datetime.timedelta(hours=1), calendar=self.calendar, color=GEvent.EVENT_COLORS[0], ) e2.save() stat1 = Statistic( user=self.alice, name='Bigger', start_time=yesterday, end_time=now, ) stat1.save() self.assertEqual(2, stat1.query().count())
def setUp(self): self.alice = User(username='******') self.alice.save() self.calendar = GCalendar(user=self.alice) self.calendar.save()