class PusherTest(TestCase): def setUp(self): super(PusherTest, self).setUp() connection.cursor().execute(CREATE_PUSH_TABLE) now = datetime.now() tomorrow = now + timedelta(days=1) self.test_event = TestPushEvent(start_date=now.date(), start_time=now.time(), title='Test Event', end_date=tomorrow.date(), end_time=tomorrow.time()) self.test_event.save() self.pusher = Pusher(self.test_event) def tearDown(self): connection.cursor().execute("DROP TABLE gcalsync_testpushevent") service = Connection().get_service() service.events().delete(calendarId='primary', eventId=self.created_event['id']).execute() def test_create_event(self): self.created_event = self.pusher.create_or_update()
class PusherTest(TestCase): def setUp(self): super(PusherTest, self).setUp() connection.cursor().execute("DROP TABLE gcalsync_testpushevent") connection.cursor().execute(CREATE_PUSH_TABLE) now = datetime.now() tomorrow = now + timedelta(days=1) self.test_event = TestPushEvent( start_date=now.date(), start_time=now.time(), title='Test Event', end_date=tomorrow.date(), end_time=tomorrow.time()) self.test_event.save() self.pusher = Pusher(self.test_event) def tearDown(self): connection.cursor().execute("DROP TABLE gcalsync_testpushevent") service = Connection().get_service() service.events().delete(calendarId='primary', eventId=self.created_event['id']).execute() def test_create_event(self): self.created_event = self.pusher.create_or_update()
def setUp(self): super(PusherTest, self).setUp() connection.cursor().execute(CREATE_PUSH_TABLE) now = datetime.now() tomorrow = now + timedelta(days=1) self.test_event = TestPushEvent(start_date=now.date(), start_time=now.time(), title='Test Event', end_date=tomorrow.date(), end_time=tomorrow.time()) self.test_event.save() self.pusher = Pusher(self.test_event)
def setUp(self): super(PusherTest, self).setUp() connection.cursor().execute("DROP TABLE gcalsync_testpushevent") connection.cursor().execute(CREATE_PUSH_TABLE) now = datetime.now() tomorrow = now + timedelta(days=1) self.test_event = TestPushEvent( start_date=now.date(), start_time=now.time(), title='Test Event', end_date=tomorrow.date(), end_time=tomorrow.time()) self.test_event.save() self.pusher = Pusher(self.test_event)