'Test converting time reprs to iso dates'

def test_to_json(self):

    self.assertEqual(DateTest.date.to_json(datetime.datetime.strptime('2012-12-31T23:59:59Z', '%Y-%m-%dT%H:%M:%SZ')), '2012-12-31T23:59:59Z')
    self.assertEqual(DateTest.date.to_json(DateTest.date.from_json('2012-12-31T23:59:59Z')), '2012-12-31T23:59:59Z')
    self.assertEqual(DateTest.date.to_json(DateTest.date.from_json('2012-12-31T23:00:01-01:00')), '2012-12-31T23:00:01-01:00')
    with self.assertRaises(TypeError):
        DateTest.date.to_json('2012-12-31T23:00:01-01:00')
