'Test event construction'

def testConstruction(self):

    assertEqual = self.assertEqual
    assertTrue = self.assertTrue
    start = tp_datetime(2004, 1, 1)
    end = tp_datetime(2004, 3, 21)
    event_id = 1
    values = {'test': 2}
    event = S3TimeSeriesEvent(event_id, start=start, end=end)
    assertEqual(event.event_id, event_id)
    assertTrue(isinstance(event.values, dict))
    assertEqual(event['test'], None)
    event = S3TimeSeriesEvent(event_id, start=start, end=end, values=values)
    assertEqual(event.event_id, event_id)
    assertEqual(event.values, values)
    assertEqual(event['test'], values['test'])
    event = S3TimeSeriesEvent(event_id, start=start, end=end, values=values, row='A')
    self.assertEqual(event.event_id, event_id)
    self.assertEqual(event.values, values)
    self.assertEqual(event['test'], values['test'])
    self.assertEqual(event.rows, set(['A']))
    self.assertEqual(event.cols, set())
    event = S3TimeSeriesEvent(event_id, start=start, end=end, values=values, row='B', col=[1, 4, 7])
    self.assertEqual(event.event_id, event_id)
    self.assertEqual(event.values, values)
    self.assertEqual(event['test'], values['test'])
    self.assertEqual(event.rows, set(['B']))
    self.assertEqual(event.cols, set([1, 4, 7]))
