def test_invalidDatetime(self):
        """
        L{amp.DateTime.toString} raises L{ValueError} when passed a naive
        datetime (a datetime with no timezone information).
        """
        d = amp.DateTime()
        self.assertRaises(ValueError, d.toString,
            datetime.datetime(2010, 12, 25, 0, 0, 0))

        L{amp.DateTime.toString} raises L{ValueError} when passed a naive
        datetime (a datetime with no timezone information).
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_amp.py