'twisted.web.server.date_time_string should not be used; instead use
twisted.web.http.datetimeToString directly'

def test_deprecatedAttributeDateTimeString(self):

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