'Ensures that the correct deprecation warning was issued.'

def ensureDeprecated(self, message):

    warnings = self.flushWarnings()
    self.assertIs(warnings[0]['category'], DeprecationWarning)
    self.assertEqual(warnings[0]['message'], message)
    self.assertEqual(len(warnings), 1)
