'twisted.web.server.string_date_time should not be used; instead use
twisted.web.http.stringToDatetime directly'

def test_deprecatedAttributeStringDateTime(self):

    server.string_date_time
    warnings = self.flushWarnings(offendingFunctions=[self.test_deprecatedAttributeStringDateTime])
    self.assertEqual(len(warnings), 1)
    self.assertEqual(warnings[0]['category'], DeprecationWarning)
    self.assertEqual(warnings[0]['message'], 'twisted.web.server.string_date_time    was    deprecated    in    Twisted    12.1.0:    Please    use    twisted.web.http.stringToDatetime    instead')
